- # Take snapshots
- if function.name == 'eglSwapBuffers':
- print ' glsnapshot::snapshot(__call);'
- if function.name in ('glFinish', 'glFlush'):
- print ' tracer_context *ctx = __get_context();'
- print ' GLint __draw_framebuffer = 0;'
- print ' __glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &__draw_framebuffer);'
- print ' if (__draw_framebuffer == 0 && ctx->profile == PROFILE_COMPAT) {'
- print ' GLint __draw_buffer = GL_NONE;'
- print ' __glGetIntegerv(GL_DRAW_BUFFER, &__draw_buffer);'
- print ' if (__draw_buffer == GL_FRONT) {'
- print ' glsnapshot::snapshot(__call);'
- print ' }'
- print ' }'