Use HAVE_GLSL instead of HAVE_XML.

Replace where it makes sense.
This commit is contained in:
Themaister 2012-10-16 19:43:05 +02:00
parent 97ef554e31
commit 6d3c12b9bd
4 changed files with 12 additions and 11 deletions

View File

@ -236,6 +236,7 @@ ifeq ($(HAVE_XML), 1)
ifeq ($(HAVE_OPENGL), 1)
OBJ += gfx/shader_glsl.o
DEFINES += -DHAVE_GLSL
endif
endif

View File

@ -135,7 +135,7 @@ endif
ifeq ($(HAVE_XML), 1)
OBJ += gfx/shader_glsl.o gfx/image.o gfx/state_tracker.o cheats.o
DEFINES += -Ilibxml2 -DHAVE_XML
DEFINES += -Ilibxml2 -DHAVE_XML -DHAVE_GLSL
LIBS += -lxml2 -liconv
endif

View File

@ -38,7 +38,7 @@
#include "shader_cg.h"
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
#include "shader_glsl.h"
#endif
@ -225,7 +225,7 @@ void gl_shader_use(unsigned index)
gl_cg_use(index);
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
gl_glsl_use(index);
#endif
}
@ -236,7 +236,7 @@ static inline void gl_shader_deinit(void)
gl_cg_deinit();
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
gl_glsl_deinit();
#endif
}
@ -280,7 +280,7 @@ void gl_shader_set_coords(const struct gl_coords *coords, const math_matrix *mat
(void)ret_coords;
(void)ret_mvp;
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
if (!ret_coords)
ret_coords |= gl_glsl_set_coords(coords);
if (!ret_mvp)
@ -321,7 +321,7 @@ static inline void gl_shader_set_params(unsigned width, unsigned height,
frame_count, info, prev_info, fbo_info, fbo_info_cnt);
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
gl_glsl_set_params(width, height,
tex_width, tex_height,
out_width, out_height,
@ -337,7 +337,7 @@ static unsigned gl_shader_num(void)
return cg_num;
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
unsigned glsl_num = gl_glsl_num();
if (glsl_num)
return glsl_num;
@ -355,7 +355,7 @@ static bool gl_shader_filter_type(unsigned index, bool *smooth)
valid = gl_cg_filter_type(index, smooth);
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
if (!valid)
valid = gl_glsl_filter_type(index, smooth);
#endif
@ -373,7 +373,7 @@ static void gl_shader_scale(unsigned index, struct gl_fbo_scale *scale)
gl_cg_shader_scale(index, scale);
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
if (!scale->valid)
gl_glsl_shader_scale(index, scale);
#endif
@ -1272,7 +1272,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
gl_cg_set_menu_shader(default_paths.menu_shader_file);
#endif
#if defined(HAVE_XML) || defined(HAVE_GLSL)
#ifdef HAVE_GLSL
gl_glsl_set_get_proc_address(gl->ctx_driver->get_proc_address);
#endif

View File

@ -155,7 +155,7 @@ struct gl_coords
#define MAX_SHADERS 16
#if defined(HAVE_XML) || defined(HAVE_CG)
#if defined(HAVE_GLSL) || defined(HAVE_CG)
#define TEXTURES 8
#else
#define TEXTURES 1