forked from enlightenment/efl
and now complex stuff works..... woot!
SVN revision: 43656
This commit is contained in:
parent
fccd2db126
commit
7999691b9f
|
@ -82,8 +82,9 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!gc->change.size) ||
|
if ((!gc->change.size) ||
|
||||||
((gc->shared->w == w) && (gc->shared->h == gc->h)))
|
((gc->shared->w == w) && (gc->shared->h == h)))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gc->shared->w = w;
|
gc->shared->w = w;
|
||||||
gc->shared->h = h;
|
gc->shared->h = h;
|
||||||
gc->change.size = 0;
|
gc->change.size = 0;
|
||||||
|
@ -91,10 +92,8 @@ _evas_gl_common_viewport_set(Evas_GL_Context *gc)
|
||||||
glViewport(0, 0, w, h);
|
glViewport(0, 0, w, h);
|
||||||
|
|
||||||
matrix_ident(proj);
|
matrix_ident(proj);
|
||||||
if (m == 1)
|
if (m == 1) matrix_ortho(proj, 0, w, 0, h, -1.0, 1.0);
|
||||||
matrix_ortho(proj, 0, w, 0, h, -1.0, 1.0);
|
else matrix_ortho(proj, 0, w, h, 0, -1.0, 1.0);
|
||||||
else
|
|
||||||
matrix_ortho(proj, 0, w, h, 0, -1.0, 1.0);
|
|
||||||
|
|
||||||
glUseProgram(gc->shared->shader.rect.prog);
|
glUseProgram(gc->shared->shader.rect.prog);
|
||||||
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.rect.prog, "mvp"), 1,
|
glUniformMatrix4fv(glGetUniformLocation(gc->shared->shader.rect.prog, "mvp"), 1,
|
||||||
|
@ -307,13 +306,9 @@ evas_gl_common_context_target_surface_set(Evas_GL_Context *gc,
|
||||||
// FIXME: viewport goopies
|
// FIXME: viewport goopies
|
||||||
gc->change.size = 1;
|
gc->change.size = 1;
|
||||||
if (gc->shader.surface == gc->def_surface)
|
if (gc->shader.surface == gc->def_surface)
|
||||||
{
|
glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
glBindFramebuffer(GL_FRAMEBUFFER_EXT, surface->tex->pt->fb);
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER_EXT, surface->tex->pt->fb);
|
|
||||||
}
|
|
||||||
_evas_gl_common_viewport_set(gc);
|
_evas_gl_common_viewport_set(gc);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue