mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Fix libretro GL state bug on frame dupe.
Need to force backbuffer and viewport on duped frames.
This commit is contained in:
parent
c76fc068dc
commit
870ef37258
26
gfx/gl.c
26
gfx/gl.c
@ -1402,18 +1402,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
// Data is already on GPU :) Have to reset some state however incase core changed it.
|
||||
if (gl->hw_render_fbo_init)
|
||||
{
|
||||
gl_update_input_size(gl, width, height, pitch, false);
|
||||
|
||||
if (!gl->fbo_inited)
|
||||
{
|
||||
gl_bind_backbuffer();
|
||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (!gl->hw_render_fbo_init)
|
||||
#endif
|
||||
{
|
||||
gl_update_input_size(gl, width, height, pitch, true);
|
||||
@ -1426,6 +1415,19 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei
|
||||
else
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
|
||||
#ifdef HAVE_FBO
|
||||
// Data is already on GPU :) Have to reset some state however incase core changed it.
|
||||
if (gl->hw_render_fbo_init)
|
||||
{
|
||||
gl_update_input_size(gl, width, height, pitch, false);
|
||||
if (!gl->fbo_inited)
|
||||
{
|
||||
gl_bind_backbuffer();
|
||||
gl_set_viewport(gl, gl->win_width, gl->win_height, false, true);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Have to reset rendering state which libretro core could easily have overridden.
|
||||
#ifdef HAVE_FBO
|
||||
if (gl->hw_render_fbo_init)
|
||||
|
Loading…
x
Reference in New Issue
Block a user