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

Function glFramebufferDrawBufferEXT

server/faker-gl.cpp:294–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

292
293
294void glFramebufferDrawBufferEXT(GLuint framebuffer, GLenum mode)
295{
296 if(faker::getOGLExcludeCurrent() || faker::getEGLXContextCurrent())
297 {
298 _glFramebufferDrawBufferEXT(framebuffer, mode);
299 return;
300 }
301
302 TRY();
303
304 /////////////////////////////////////////////////////////////////////////////
305 OPENTRACE(glFramebufferDrawBufferEXT); PRARGI(framebuffer); PRARGX(mode);
306 STARTTRACE();
307 /////////////////////////////////////////////////////////////////////////////
308
309 faker::VirtualWin *vw = NULL;
310 int before = -1, after = -1, rbefore = -1, rafter = -1;
311 GLXDrawable drawable = 0;
312
313 if(framebuffer == 0 && (drawable = backend::getCurrentDrawable()) != 0
314 && (vw = WINHASH.find(NULL, drawable)) != NULL)
315 {
316 before = DrawingToFront();
317 rbefore = DrawingToRight();
318 backend::namedFramebufferDrawBuffer(framebuffer, mode, true);
319 after = DrawingToFront();
320 rafter = DrawingToRight();
321 if(before && !after) vw->dirty = true;
322 if(rbefore && !rafter && vw->isStereo()) vw->rdirty = true;
323 }
324 else backend::namedFramebufferDrawBuffer(framebuffer, mode, true);
325
326 /////////////////////////////////////////////////////////////////////////////
327 STOPTRACE();
328 if(drawable && vw)
329 {
330 PRARGI(vw->dirty); PRARGI(vw->rdirty); PRARGX(vw->getGLXDrawable());
331 }
332 CLOSETRACE();
333 /////////////////////////////////////////////////////////////////////////////
334
335 CATCH();
336}
337
338
339void glFramebufferDrawBuffersEXT(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