[Tuxracer-checkins] CVS: tuxracer/src gl_util.h,1.11,1.12
Status: Beta
Brought to you by:
jfpatry
From: Jasmin P. <jf...@us...> - 2000-10-03 07:43:58
|
Update of /cvsroot/tuxracer/tuxracer/src In directory slayer.i.sourceforge.net:/tmp/cvs-serv23732/src Modified Files: gl_util.h Log Message: Added hack to work around compile problems with old gl.h files. Index: gl_util.h =================================================================== RCS file: /cvsroot/tuxracer/tuxracer/src/gl_util.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** gl_util.h 2000/09/26 01:22:16 1.11 --- gl_util.h 2000/10/03 07:43:55 1.12 *************** *** 28,38 **** #include "tuxracer.h" ! /* Shouldn't need to include this if gl.h is recent, but alas we can't ! * count on that... ! */ #include <GL/glext.h> #if !defined(GL_GLEXT_VERSION) || GL_GLEXT_VERSION < 6 ! # error "*** You need a more recent copy of glext.h. You can get one at http://oss.sgi.com/projects/ogl-sample/ABI/glxext.h ; it goes in /usr/include/GL. ***" #endif --- 28,57 ---- #include "tuxracer.h" ! /* Hack to fix compiling problem with old gl.h's, reported by Steve ! Baker <sjb...@ai...>. Some old gl.h's don't include glext.h, but ! do this: ! ! #define GL_EXT_compiled_vertex_array 1 ! ! since they do define the glLockArraysEXT/glUnlockArraysEXT ! functions. However, this prevents PFNGLLOCKARRAYSEXTPROC / ! PFNGLUNLOCKARRAYSEXTPROC from being defined in glext.h. So, we do ! the following, which at worst results in a warning (and is awfully ! ugly): ! ! #undef GL_EXT_compiled_vertex_array ! ! The *correct* thing to do would be for gl.h to #include glext.h, as ! recent gl.h's do. However, versions of Mesa as recent as 3.2.1 ! don't do this, so we have to work around it. ! */ ! #undef GL_EXT_compiled_vertex_array ! ! /* Shouldn't need to include glext.h if gl.h is recent, but alas we can't ! * count on that... */ #include <GL/glext.h> #if !defined(GL_GLEXT_VERSION) || GL_GLEXT_VERSION < 6 ! # error "*** You need a more recent copy of glext.h. You can get one at http://oss.sgi.com/projects/ogl-sample/ABI/glext.h ; it goes in /usr/include/GL. ***" #endif |