Revision
200
Author
gstaplin@apple.com
Date
2009-02-20 01:18:35 -0800 (Fri, 20 Feb 2009)

Log Message

Fix a bug in the glxinfo.c sources that is due to gl.h header differences.
glxinfo was assuming that a function pointer type existed (assuming Mesa headers).

Remove the #undef of some important extensions that broke glxinfo.c:
GL_ARB_vertex_program and GL_ARB_fragment_program

Modified Paths

Diff

Modified: AppleSGLX/trunk/include/GL/gl.h (199 => 200)


--- AppleSGLX/trunk/include/GL/gl.h	2009-02-20 09:04:20 UTC (rev 199)
+++ AppleSGLX/trunk/include/GL/gl.h	2009-02-20 09:18:35 UTC (rev 200)
@@ -1,5 +1,2 @@
 #include "/System/Library/Frameworks/OpenGL.framework/Headers/gl.h"
 
-/* These cause problems with glxinfo: */
-#undef GL_ARB_vertex_program
-#undef GL_ARB_fragment_program

Modified: AppleSGLX/trunk/tests/glxinfo/glxinfo.c (199 => 200)


--- AppleSGLX/trunk/tests/glxinfo/glxinfo.c	2009-02-20 09:04:20 UTC (rev 199)
+++ AppleSGLX/trunk/tests/glxinfo/glxinfo.c	2009-02-20 09:18:35 UTC (rev 200)
@@ -1,6 +1,7 @@
 /*
  * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
- * 
+ * Copyright (C) 2009  Apple Inc.  All Rights Reserved.
+ *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
  * to deal in the Software without restriction, including without limitation
@@ -192,8 +193,11 @@
       { GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB, "GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB" },
       { (GLenum) 0, NULL }
    };
-   PFNGLGETPROGRAMIVARBPROC GetProgramivARB_func = (PFNGLGETPROGRAMIVARBPROC)
-      glXGetProcAddressARB((GLubyte *) "glGetProgramivARB");
+
+   void (*GetProgramivARB_func)(GLenum, GLenum, GLvoid *);
+
+   GetProgramivARB_func = (void (*)(GLenum, GLenum, GLvoid *))
+       glXGetProcAddressARB((GLubyte *) "glGetProgramivARB");
    GLint max[1];
    int i;