From 3cdf90deeb4ec1b5f6753080be0ca1b0ab28d3a7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 20 Dec 2014 00:44:14 +0100 Subject: [PATCH] Move gl_wrap_type_to_enum outside of HAVE_FBO ifdef --- gfx/gl.c | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/gfx/gl.c b/gfx/gl.c index 707149556b..dd595c6239 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -322,6 +322,27 @@ static inline GLenum min_filter_to_mag(GLenum type) } } +static unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type) +{ + switch (type) + { +#ifndef HAVE_OPENGLES + case RARCH_WRAP_BORDER: + 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; + } + + return 0; +} + #ifdef HAVE_FBO static void gl_shader_scale(gl_t *gl, unsigned idx, struct gfx_fbo_scale *scale) @@ -416,26 +437,6 @@ static void gl_compute_fbo_geometry(gl_t *gl, unsigned width, unsigned height, } } -static unsigned gl_wrap_type_to_enum(enum gfx_wrap_type type) -{ - switch (type) - { -#ifndef HAVE_OPENGLES - case RARCH_WRAP_BORDER: - 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; - } - - return 0; -} static void gl_create_fbo_textures(gl_t *gl) {