[osg-users] OpenGL Extension definition in OSG Headers

David Callu ledocc at gmail.com
Tue Sep 11 10:21:27 PDT 2007


Hi Robert,

   After seen and changed the patch provide by Art Tevs on the
GL_EXT_gpu_shader4 extension.
   I have remarked that the extension guard
     #ifndef GL_EXT_gpu_shader4
   don't do
     #define GL_EXT_gpu_shader4


   I go through the glext.h and I see that it is define with the extension
functions definition.



ex of the Nvidia glext.h:

#ifndef __glext_h_
#define __glext_h_

#ifdef __cplusplus
extern "C" {
#endif

/* blablabla */

... lot of define ...


#ifndef GL_EXT_gpu_shader4
#define GL_SAMPLER_1D_ARRAY_EXT           0x8DC0
#define ...
#endif

... lot of define ...

#ifndef GL_EXT_gpu_shader4
#define GL_EXT_gpu_shader4 1
#ifdef GL_GLEXT_PROTOTYPES
extern void APIENTRY glGetUniformuivEXT (GLuint program, GLint location,
GLuint *params);
extern void APIENTRY glBindFragDataLocationEXT (GLuint program, GLuint
color, const GLchar *name);
extern GLint APIENTRY glGetFragDataLocationEXT (GLuint program, const GLchar
*name);
extern void APIENTRY glUniform1uiEXT (GLint location, GLuint v0);
...


So, to keep OSG consistent, we need to add
   #define GL_EXT... 1
after each
   #ifndef GL_EXT...

concerned file are FragmentProgram, VertexProgram, GL2Extensions,
PointSprite,



Thought ?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070911/25cba13f/attachment-0002.htm>


More information about the osg-users mailing list