summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSung Park <sungwoo@gmail.com>2012-02-24 08:13:48 +0000
committerSung Park <sungwoo@gmail.com>2012-02-24 08:13:48 +0000
commitac0d52f04d4273d9205365778d85a2c262549051 (patch)
treecb00d50244e4fc2ee7104524629f97440a128a88
parentcf926fda0ba9ab60f804d4dc9c3844467afb1919 (diff)
Fixed glBindFramebuffer(0) issue for Direct Rendering
optimization. current_fbo wasn't being set to 0 so the above case wasn't being handled properly. SVN revision: 68392
-rw-r--r--legacy/evas/src/modules/engines/gl_x11/evas_engine.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
index 5edbb19fc8..94424b2225 100644
--- a/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
+++ b/legacy/evas/src/modules/engines/gl_x11/evas_engine.c
@@ -3514,24 +3514,27 @@ evgl_glBindFramebuffer(GLenum target, GLuint framebuffer)
3514{ 3514{
3515 Render_Engine_GL_Context *ctx = current_evgl_ctx; 3515 Render_Engine_GL_Context *ctx = current_evgl_ctx;
3516 3516
3517 if (!ctx)
3518 {
3519 ERR("No current context set.");
3520 return;
3521 }
3522
3517 // Take care of BindFramebuffer 0 issue 3523 // Take care of BindFramebuffer 0 issue
3518 if (framebuffer==0) 3524 if (framebuffer==0)
3519 { 3525 {
3520 if (gl_direct_enabled) 3526 if (gl_direct_enabled)
3521 glBindFramebuffer(target, 0); 3527 glBindFramebuffer(target, 0);
3522 else if (ctx) 3528 else
3523 { 3529 glBindFramebuffer(target, ctx->context_fbo);
3524 glBindFramebuffer(target, ctx->context_fbo); 3530 ctx->current_fbo = 0;
3525 ctx->current_fbo = 0;
3526 }
3527 } 3531 }
3528 else 3532 else
3529 { 3533 {
3530 glBindFramebuffer(target, framebuffer); 3534 glBindFramebuffer(target, framebuffer);
3531 3535
3532 // Save this for restore when doing make current 3536 // Save this for restore when doing make current
3533 if (ctx) 3537 ctx->current_fbo = framebuffer;
3534 ctx->current_fbo = framebuffer;
3535 } 3538 }
3536} 3539}
3537 3540