From 142c3b88929f5acb441551a28ab66fcae63f2487 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 12 Apr 2013 22:07:17 +0200 Subject: [PATCH] (GLSL) Same deal here - go through backend interface for functions and drop public scope for functions --- gfx/shader_glsl.c | 18 +++++++++--------- gfx/shader_glsl.h | 21 --------------------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/gfx/shader_glsl.c b/gfx/shader_glsl.c index cd0380edce..aa300f6574 100644 --- a/gfx/shader_glsl.c +++ b/gfx/shader_glsl.c @@ -567,7 +567,7 @@ static void gl_glsl_free_shader(void) glsl_shader = NULL; } -bool gl_glsl_init(const char *path) +static bool gl_glsl_init(const char *path) { #if !defined(HAVE_OPENGLES2) && !defined(HAVE_OPENGL_MODERN) && !defined(__APPLE__) // Load shader functions. @@ -726,7 +726,7 @@ bool gl_glsl_init(const char *path) return true; } -void gl_glsl_deinit(void) +static void gl_glsl_deinit(void) { if (glsl_enable) { @@ -756,7 +756,7 @@ void gl_glsl_deinit(void) gl_glsl_reset_attrib(); } -void gl_glsl_set_params(unsigned width, unsigned height, +static void gl_glsl_set_params(unsigned width, unsigned height, unsigned tex_width, unsigned tex_height, unsigned out_width, unsigned out_height, unsigned frame_count, @@ -935,7 +935,7 @@ void gl_glsl_set_params(unsigned width, unsigned height, } } -bool gl_glsl_set_mvp(const math_matrix *mat) +static bool gl_glsl_set_mvp(const math_matrix *mat) { if (!glsl_enable || !glsl_shader->modern) return false; @@ -947,7 +947,7 @@ bool gl_glsl_set_mvp(const math_matrix *mat) return true; } -bool gl_glsl_set_coords(const struct gl_coords *coords) +static bool gl_glsl_set_coords(const struct gl_coords *coords) { if (!glsl_enable || !glsl_shader->modern) return false; @@ -988,7 +988,7 @@ bool gl_glsl_set_coords(const struct gl_coords *coords) return true; } -void gl_glsl_use(unsigned index) +static void gl_glsl_use(unsigned index) { if (glsl_enable) { @@ -999,12 +999,12 @@ void gl_glsl_use(unsigned index) } } -unsigned gl_glsl_num(void) +static unsigned gl_glsl_num(void) { return glsl_shader->passes; } -bool gl_glsl_filter_type(unsigned index, bool *smooth) +static bool gl_glsl_filter_type(unsigned index, bool *smooth) { if (glsl_enable && index) { @@ -1017,7 +1017,7 @@ bool gl_glsl_filter_type(unsigned index, bool *smooth) return false; } -void gl_glsl_shader_scale(unsigned index, struct gfx_fbo_scale *scale) +static void gl_glsl_shader_scale(unsigned index, struct gfx_fbo_scale *scale) { if (glsl_enable && index) *scale = glsl_shader->pass[index - 1].fbo; diff --git a/gfx/shader_glsl.h b/gfx/shader_glsl.h index ec2e26cd4b..88ac1eedf0 100644 --- a/gfx/shader_glsl.h +++ b/gfx/shader_glsl.h @@ -23,27 +23,6 @@ #define RARCH_GLSL_MAX_SHADERS 16 #define RARCH_GLSL_MENU_SHADER_INDEX (RARCH_GLSL_MAX_SHADERS - 1) -bool gl_glsl_init(const char *path); -void gl_glsl_deinit(void); - -void gl_glsl_set_params(unsigned width, unsigned height, - unsigned tex_width, unsigned tex_height, - unsigned out_width, unsigned out_height, - unsigned frame_counter, - const struct gl_tex_info *info, - const struct gl_tex_info *prev_info, - const struct gl_tex_info *fbo_info, unsigned fbo_info_cnt); - -void gl_glsl_use(unsigned index); - -unsigned gl_glsl_num(void); - -bool gl_glsl_filter_type(unsigned index, bool *smooth); -void gl_glsl_shader_scale(unsigned index, struct gfx_fbo_scale *scale); - -bool gl_glsl_set_coords(const struct gl_coords *coords); -bool gl_glsl_set_mvp(const math_matrix *mat); - void gl_glsl_set_get_proc_address(gfx_ctx_proc_t (*proc)(const char*)); extern const gl_shader_backend_t gl_glsl_backend;