summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2006-05-15 15:35:38 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2006-05-15 15:35:38 +0000
commit2ca741ad4b95ce5c91b99c4628e5e5e256f3e1d9 (patch)
tree102ad98052fc7c1e51a63851b0fda23da056ceda
parent5e2e96b6f010853abcc5a38fd7283768438003b2 (diff)
downloadexternal_mesa3d-2ca741ad4b95ce5c91b99c4628e5e5e256f3e1d9.zip
external_mesa3d-2ca741ad4b95ce5c91b99c4628e5e5e256f3e1d9.tar.gz
external_mesa3d-2ca741ad4b95ce5c91b99c4628e5e5e256f3e1d9.tar.bz2
added a few extension #ifdef tests
-rw-r--r--progs/xdemos/glxinfo.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c
index 25dc398..fdd1c05 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 <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/gl.h>
@@ -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
}