forked from enlightenment/efl
Evas GL: Restore viewport and scissor test for GLESv1
This is necessary when switching back to direct rendering. But I suspect there are other corner cases that we didn't spot.
This commit is contained in:
parent
ae2061dbe2
commit
29da1113ee
|
@ -1744,6 +1744,11 @@ _evgl_gles1_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
|
|||
_gles1_api.glViewport(nc[0], nc[1], nc[2], nc[3]);
|
||||
}
|
||||
|
||||
ctx->viewport_direct[0] = nc[0];
|
||||
ctx->viewport_direct[1] = nc[1];
|
||||
ctx->viewport_direct[2] = nc[2];
|
||||
ctx->viewport_direct[3] = nc[3];
|
||||
|
||||
// Keep a copy of the original coordinates
|
||||
ctx->viewport_coord[0] = x;
|
||||
ctx->viewport_coord[1] = y;
|
||||
|
|
|
@ -2235,8 +2235,6 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
|
|||
if (_evgl_direct_renderable(rsc, sfc))
|
||||
{
|
||||
// Transition from pixmap surface rendering to direct rendering
|
||||
/*
|
||||
* TODO:
|
||||
if (!rsc->direct.rendered)
|
||||
{
|
||||
// Restore viewport and scissor test to direct rendering mode
|
||||
|
@ -2244,7 +2242,6 @@ evgl_make_current(void *eng_data, EVGL_Surface *sfc, EVGL_Context *ctx)
|
|||
if ((ctx->direct_scissor) && (!ctx->scissor_enabled))
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
}
|
||||
*/
|
||||
if (dbg) DBG("sfc %p is direct renderable.", sfc);
|
||||
rsc->direct.rendered = 1;
|
||||
}
|
||||
|
|
|
@ -172,6 +172,7 @@ struct _EVGL_Context
|
|||
|
||||
int scissor_coord[4];
|
||||
int viewport_coord[4];
|
||||
int viewport_direct[4];
|
||||
|
||||
// For GLES1 with indirect rendering
|
||||
EVGLNative_Context gles1_context;
|
||||
|
|
Loading…
Reference in New Issue