mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Don't ifdef update_tex_filter_frame for FBO.
This commit is contained in:
parent
ca5ff43b6f
commit
7a8628ff41
48
gfx/gl.c
48
gfx/gl.c
@ -562,30 +562,6 @@ void gl_deinit_fbo(void *data)
|
||||
}
|
||||
}
|
||||
|
||||
static void gl_update_tex_filter_frame(gl_t *gl)
|
||||
{
|
||||
bool smooth = false;
|
||||
if (!gl_shader_filter_type(gl, 1, &smooth))
|
||||
smooth = g_settings.video.smooth;
|
||||
|
||||
GLuint new_filt = smooth ? GL_LINEAR : GL_NEAREST;
|
||||
if (new_filt == gl->tex_filter)
|
||||
return;
|
||||
|
||||
gl->tex_filter = new_filt;
|
||||
for (unsigned i = 0; i < TEXTURES; i++)
|
||||
{
|
||||
if (gl->texture[i])
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[i]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl->tex_filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl->tex_filter);
|
||||
}
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
}
|
||||
|
||||
void gl_init_fbo(void *data, unsigned width, unsigned height)
|
||||
{
|
||||
gl_t *gl = (gl_t*)data;
|
||||
@ -1932,6 +1908,30 @@ static bool gl_focus(void *data)
|
||||
return context_has_focus_func();
|
||||
}
|
||||
|
||||
static void gl_update_tex_filter_frame(gl_t *gl)
|
||||
{
|
||||
bool smooth = false;
|
||||
if (!gl_shader_filter_type(gl, 1, &smooth))
|
||||
smooth = g_settings.video.smooth;
|
||||
|
||||
GLuint new_filt = smooth ? GL_LINEAR : GL_NEAREST;
|
||||
if (new_filt == gl->tex_filter)
|
||||
return;
|
||||
|
||||
gl->tex_filter = new_filt;
|
||||
for (unsigned i = 0; i < TEXTURES; i++)
|
||||
{
|
||||
if (gl->texture[i])
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[i]);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl->tex_filter);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl->tex_filter);
|
||||
}
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]);
|
||||
}
|
||||
|
||||
#if defined(HAVE_GLSL) || defined(HAVE_CG)
|
||||
static bool gl_set_shader(void *data, enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user