diff --git a/gfx/common/gl_common.h b/gfx/common/gl_common.h index 40a623db58..31c369e282 100644 --- a/gfx/common/gl_common.h +++ b/gfx/common/gl_common.h @@ -254,44 +254,6 @@ static INLINE void gl_bind_texture(GLuint id, GLint wrap_mode, GLint mag_filter, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min_filter); } -static INLINE unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type) -{ - switch (type) - { -#ifndef HAVE_OPENGLES - case RARCH_WRAP_BORDER: /* GL_CLAMP_TO_BORDER: Available since GL 1.3 */ - return GL_CLAMP_TO_BORDER; -#else - case RARCH_WRAP_BORDER: -#endif - case RARCH_WRAP_EDGE: - return GL_CLAMP_TO_EDGE; - case RARCH_WRAP_REPEAT: - return GL_REPEAT; - case RARCH_WRAP_MIRRORED_REPEAT: - return GL_MIRRORED_REPEAT; - default: - break; - } - - return 0; -} - -static INLINE GLenum gl_min_filter_to_mag(GLenum type) -{ - switch (type) - { - case GL_LINEAR_MIPMAP_LINEAR: - return GL_LINEAR; - case GL_NEAREST_MIPMAP_NEAREST: - return GL_NEAREST; - default: - break; - } - - return type; -} - static INLINE bool gl_set_core_context(enum retro_hw_context_type ctx_type) { gfx_ctx_flags_t flags; diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index d02df91d60..2e29e76bc1 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -816,6 +816,44 @@ error: return false; } +static unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type) +{ + switch (type) + { +#ifndef HAVE_OPENGLES + case RARCH_WRAP_BORDER: /* GL_CLAMP_TO_BORDER: Available since GL 1.3 */ + return GL_CLAMP_TO_BORDER; +#else + case RARCH_WRAP_BORDER: +#endif + case RARCH_WRAP_EDGE: + return GL_CLAMP_TO_EDGE; + case RARCH_WRAP_REPEAT: + return GL_REPEAT; + case RARCH_WRAP_MIRRORED_REPEAT: + return GL_MIRRORED_REPEAT; + default: + break; + } + + return 0; +} + +static GLenum gl_min_filter_to_mag(GLenum type) +{ + switch (type) + { + case GL_LINEAR_MIPMAP_LINEAR: + return GL_LINEAR; + case GL_NEAREST_MIPMAP_NEAREST: + return GL_NEAREST; + default: + break; + } + + return type; +} + static void gl_create_fbo_texture(gl_t *gl, gl2_renderchain_data_t *chain, unsigned i, GLuint texture)