From 2ca741ad4b95ce5c91b99c4628e5e5e256f3e1d9 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 15 May 2006 15:35:38 +0000 Subject: [PATCH] added a few extension #ifdef tests --- progs/xdemos/glxinfo.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index 25dc3986ed7..fdd1c0523f6 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -33,6 +33,8 @@ * Brian Paul 26 January 2000 */ +#define GLX_GLXEXT_PROTOTYPES + #include #include #include @@ -50,6 +52,7 @@ #define GLX_TRANSPARENT_RGB 0x8008 #endif + typedef enum { Normal, @@ -203,7 +206,7 @@ print_program_limits(GLenum target) printf(" %s = %d\n", limits[i].name, max[0]); } } -#endif /* GL_ARB_vertex_program */ +#endif /* GL_ARB_vertex_program / GL_ARB_fragment_program */ } @@ -341,18 +344,26 @@ print_limits(const char *extensions) printf(" GL_MAX_CONVOLUTION_WIDTH/HEIGHT = %d, %d\n", max[0], max[1]); } +#if defined(GL_ARB_vertex_program) if (strstr(extensions, "GL_ARB_vertex_program")) { print_program_limits(GL_VERTEX_PROGRAM_ARB); } +#endif +#if defined(GL_ARB_fragment_program) if (strstr(extensions, "GL_ARB_fragment_program")) { print_program_limits(GL_FRAGMENT_PROGRAM_ARB); } +#endif +#if defined(GL_ARB_vertex_shader) if (strstr(extensions, "GL_ARB_vertex_shader")) { print_shader_limits(GL_VERTEX_SHADER_ARB); } +#endif +#if defined(GL_ARB_fragment_shader) if (strstr(extensions, "GL_ARB_fragment_shader")) { print_shader_limits(GL_FRAGMENT_SHADER_ARB); } +#endif } -- 2.30.2