From a871ac669f68c5932cf5af575e12b2660e1a335d Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Tue, 8 Jun 2010 22:54:26 +0100 Subject: [PATCH] test-shader: guard GLES2 specific changes with COGL_HAS_GLES2 Previously we were using an internal only HAVE_COGL_GLES2 define to guard GLES 2 specific changes so for instance the precision modifiers weren't being emitted in the shader source. http://bugzilla.o-hand.com/show_bug.cgi?id=2178 --- tests/interactive/test-shader.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/interactive/test-shader.c b/tests/interactive/test-shader.c index 2261c51e7..0dd3c3e8d 100644 --- a/tests/interactive/test-shader.c +++ b/tests/interactive/test-shader.c @@ -20,7 +20,7 @@ typedef struct /* These variables are used instead of the standard GLSL variables on GLES 2 */ -#ifdef HAVE_COGL_GLES2 +#ifdef COGL_HAS_GLES2 #define GLES2_VARS \ "precision mediump float;\n" \ @@ -29,13 +29,13 @@ typedef struct #define TEX_COORD "tex_coord" #define COLOR_VAR "frag_color" -#else /* HAVE_COGL_GLES2 */ +#else /* COGL_HAS_GLES2 */ #define GLES2_VARS "" #define TEX_COORD "gl_TexCoord[0]" #define COLOR_VAR "gl_Color" -#endif /* HAVE_COGL_GLES2 */ +#endif /* COGL_HAS_GLES2 */ /* a couple of boilerplate defines that are common amongst all the * sample shaders @@ -301,7 +301,7 @@ button_release_cb (ClutterActor *actor, return FALSE; } -#ifdef HAVE_COGL_GLES2 +#ifdef COGL_HAS_GLES2 static gboolean timeout_cb (gpointer data) { @@ -314,7 +314,7 @@ timeout_cb (gpointer data) return TRUE; } -#endif /* HAVE_COGL_GLES2 */ +#endif /* COGL_HAS_GLES2 */ G_MODULE_EXPORT gint test_shader_main (gint argc, gchar *argv[]) @@ -412,7 +412,7 @@ test_shader_main (gint argc, gchar *argv[]) g_signal_connect (actor, "button-release-event", G_CALLBACK (button_release_cb), NULL); -#ifdef HAVE_COGL_GLES2 +#ifdef COGL_HAS_GLES2 /* On an embedded platform it is difficult to right click so we will cycle through the shaders automatically */ g_timeout_add_seconds (3, timeout_cb, actor);