Evas GL: Return current framebuffer based on ctx information

ctx->current_fbo should contain the visible FBO value, even
if indirect rendering is used.
This commit is contained in:
Jean-Philippe Andre 2014-11-27 14:51:58 +09:00
parent e2a6f5129c
commit 129ba38cc7
1 changed files with 14 additions and 1 deletions

View File

@ -478,7 +478,7 @@ _evgl_glGetIntegerv(GLenum pname, GLint* params)
{ {
if (!params) if (!params)
{ {
ERR("Inavlid Parameter"); ERR("Invalid Parameter");
return; return;
} }
@ -527,6 +527,19 @@ _evgl_glGetIntegerv(GLenum pname, GLint* params)
} }
} }
} }
else
{
if (pname == GL_FRAMEBUFFER_BINDING)
{
rsc = _evgl_tls_resource_get();
ctx = rsc ? rsc->current_ctx : NULL;
if (ctx)
{
*params = ctx->current_fbo;
return;
}
}
}
glGetIntegerv(pname, params); glGetIntegerv(pname, params);
} }