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

Function glNamedFramebufferDrawBuffer

server/faker-gl.cpp:666–708  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664
665
666void glNamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
667{
668 if(faker::getOGLExcludeCurrent() || faker::getEGLXContextCurrent())
669 {
670 _glNamedFramebufferDrawBuffer(framebuffer, buf);
671 return;
672 }
673
674 TRY();
675
676 /////////////////////////////////////////////////////////////////////////////
677 OPENTRACE(glNamedFramebufferDrawBuffer); PRARGI(framebuffer); PRARGX(buf);
678 STARTTRACE();
679 /////////////////////////////////////////////////////////////////////////////
680
681 faker::VirtualWin *vw = NULL;
682 int before = -1, after = -1, rbefore = -1, rafter = -1;
683 GLXDrawable drawable = 0;
684
685 if(framebuffer == 0 && (drawable = backend::getCurrentDrawable()) != 0
686 && (vw = WINHASH.find(NULL, drawable)) != NULL)
687 {
688 before = DrawingToFront();
689 rbefore = DrawingToRight();
690 backend::namedFramebufferDrawBuffer(framebuffer, buf);
691 after = DrawingToFront();
692 rafter = DrawingToRight();
693 if(before && !after) vw->dirty = true;
694 if(rbefore && !rafter && vw->isStereo()) vw->rdirty = true;
695 }
696 else backend::namedFramebufferDrawBuffer(framebuffer, buf);
697
698 /////////////////////////////////////////////////////////////////////////////
699 STOPTRACE();
700 if(drawable && vw)
701 {
702 PRARGI(vw->dirty); PRARGI(vw->rdirty); PRARGX(vw->getGLXDrawable());
703 }
704 CLOSETRACE();
705 /////////////////////////////////////////////////////////////////////////////
706
707 CATCH();
708}
709
710
711void glNamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n,

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