3 Nov 2003 21:14
[ mesa3d-Bugs-834673 ] GL.h: functions assigned to wrong extensions
SourceForge.net <noreply <at> sourceforge.net>
2003-11-03 20:14:44 GMT
2003-11-03 20:14:44 GMT
Bugs item #834673, was opened at 2003-11-02 19:26 Message generated for change (Comment added) made by elf-stone You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100003&aid=834673&group_id=3 Category: mesa-core Group: other Status: Open Resolution: None Priority: 5 Submitted By: Ben Woodhouse (elf-stone) Assigned to: Nobody/Anonymous (nobody) Summary: GL.h: functions assigned to wrong extensions Initial Comment: The GL.h file included in mesa 5.0.2 has a number of bugs which are causing my extension loading library not to work with mesa's headers. These problems are due to the fact that a number of extension functions are defined as being part of the wrong extensions. The bugs are as follows: - glCopyTexSubImage3DEXT is part of GL_EXT_copy_texture, not GL_EXT_texture3D (line 2189) - glColorSubTableEXT is part of GL_EXT_color_subtable, not GL_EXT_paletted_texture (line 2394) - glPointParameterfvSGIS and glPointParameterfSGIS are part of GL_SGIS_point_parameters, not GL_EXT_point_parameters (lines 2362, 2363) This can be verified by looking at the official extension specs at http://oss.sgi.com/projects/ogl-sample/registry/ ---------------------------------------------------------------------- >Comment By: Ben Woodhouse (elf-stone) Date: 2003-11-03 20:14 Message: Logged In: YES user_id=900284 The library I'm writing is a cross-platform extension loading library based on glext.h. It defines function pointers for all extensions listed in glext.h, and provides automatic linking for every extension function. It is designed to replace glext.h. In the header file, I'm including GL.h, with GL_GLEXT_LEGACY defined to avoid the inclusion of glext.h. The header then defines function pointers and typedefs for every extension not already defined in the gl.h, using #ifndef blocks. In this way, the extensions already defined in mesa's gl.h are ignored in the build. The problem arises because in some cases the functions defined in Mesa's gl.h are assigned to different extensions to those defined in glext.h (upon which my library is based) As an example: Mesa's gl.h doesn't define the EXT_copy_texture extension, so in my header, the function pointers associated with the extension are declared. But mesa has already declared glCopyTexSubImage3DEXT as a different type (in the EXT_texture3D definition), so a conflict occurs. I realise I can define __gl_ext_h in my file to activate the include guard on the glext.h file, and this may achieve what I need more effectively. This seemed like a nasty hack though. The alternative would be to write some special-case code to make the library compatible with mesa, but since the header is currently ~6000 lines and automatically generated, this is easier said than done. ---------------------------------------------------------------------- Comment By: Ian Romanick (idr) Date: 2003-11-03 19:18 Message: Logged In: YES user_id=423974 This is a bit tricky. glCopyTexSubImage3DEXT is part of EXT_copy_texture, but it is only defined if EXT_texture3D is also defined. glColorSubTableEXT is part of *both* those extensions. I'm not sure why EXT_point_parameters has both the SGIS and the EXT versions of the functions, but I assume it was as a convenience. What are you trying to accomplish? Unless you explicitly define GL_GLEXT_LEGACY (which you probably shouldn't do), you won't even see those definitions. The definitions in glext.h are the official cannonized defines. You'll be *much* better off to use that instead. If GL_GLEXT_LEGACY is not defined, glext.h will automatically be included. But again, what are you trying to accomlish? Maybe we need to meet in the middle somewhere. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100003&aid=834673&group_id=3 ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
RSS Feed