Move forced IOS viewport logic further up.

If using multipass, the forced viewport update
will ruin the viewport.
This commit is contained in:
Themaister 2013-04-10 20:42:54 +02:00
parent 7de7c3d743
commit 49e4020437

View File

@ -657,9 +657,6 @@ void gl_init_fbo(void *data, unsigned width, unsigned height)
if (scale_last.valid)
gl->fbo_pass++;
if (gl->fbo_pass <= 0)
gl->fbo_pass = 1;
if (!scale.valid)
{
scale.scale_x = 1.0f;
@ -1343,6 +1340,10 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
gl_shader_use_func(gl, 1);
#ifdef IOS // Apparently the viewport is lost each frame, thanks apple.
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
#endif
#ifdef HAVE_FBO
// Render to texture in first pass.
if (gl->fbo_inited)
@ -1363,10 +1364,6 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
gl_update_resize(gl);
}
#ifdef IOS // Apparently the viewport is lost each frame, thanks apple.
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
#endif
if (frame) // Can be NULL for frame dupe / NULL render.
{
gl->tex_index = (gl->tex_index + 1) & TEXTURES_MASK;