MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / glNamedFramebufferDrawBuffers

Function glNamedFramebufferDrawBuffers

server/faker-gl.cpp:711–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709
710
711void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,
712 const GLenum *bufs)
713{
714 if(faker::getOGLExcludeCurrent() || faker::getEGLXContextCurrent())
715 {
716 _glNamedFramebufferDrawBuffers(framebuffer, n, bufs);
717 return;
718 }
719
720 TRY();
721
722 /////////////////////////////////////////////////////////////////////////////
723 OPENTRACE(glNamedFramebufferDrawBuffers); PRARGI(framebuffer); PRARGI(n);
724 if(n && bufs)
725 {
726 for(GLsizei i = 0; i < n; i++) PRARGX(bufs[i]);
727 }
728 STARTTRACE();
729 /////////////////////////////////////////////////////////////////////////////
730
731 faker::VirtualWin *vw = NULL;
732 int before = -1, after = -1, rbefore = -1, rafter = -1;
733 GLXDrawable drawable = 0;
734
735 if(framebuffer == 0 && (drawable = backend::getCurrentDrawable()) != 0
736 && (vw = WINHASH.find(NULL, drawable)) != NULL)
737 {
738 before = DrawingToFront();
739 rbefore = DrawingToRight();
740 backend::namedFramebufferDrawBuffers(framebuffer, n, bufs);
741 after = DrawingToFront();
742 rafter = DrawingToRight();
743 if(before && !after) vw->dirty = true;
744 if(rbefore && !rafter && vw->isStereo()) vw->rdirty = true;
745 }
746 else backend::namedFramebufferDrawBuffers(framebuffer, n, bufs);
747
748 /////////////////////////////////////////////////////////////////////////////
749 STOPTRACE();
750 if(drawable && vw)
751 {
752 PRARGI(vw->dirty); PRARGI(vw->rdirty); PRARGX(vw->getGLXDrawable());
753 }
754 CLOSETRACE();
755 /////////////////////////////////////////////////////////////////////////////
756
757 CATCH();
758}
759
760
761void glNamedFramebufferReadBuffer(GLuint framebuffer, GLenum mode)

Callers

nothing calls this directly

Calls 7

getCurrentDrawableFunction · 0.85
DrawingToFrontFunction · 0.85
DrawingToRightFunction · 0.85
findMethod · 0.45
isStereoMethod · 0.45
getGLXDrawableMethod · 0.45

Tested by

no test coverage detected