mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +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]);
|
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||||
|
|
||||||
#ifdef HAVE_FBO
|
#ifdef HAVE_FBO
|
||||||
// Data is already on GPU :) Have to reset some state however incase core changed it.
|
if (!gl->hw_render_fbo_init)
|
||||||
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
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
gl_update_input_size(gl, width, height, pitch, true);
|
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
|
else
|
||||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
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.
|
// Have to reset rendering state which libretro core could easily have overridden.
|
||||||
#ifdef HAVE_FBO
|
#ifdef HAVE_FBO
|
||||||
if (gl->hw_render_fbo_init)
|
if (gl->hw_render_fbo_init)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user