PDA

View Full Version : Missing #defines in Macintosh gl.h



Peter Teeson
11-14-2000, 06:37 PM
I'm porting a graphics library from Windows to the Mac.
One of the source files is glext.h and the comments indicate the orginal code was from SGI in Jan 2000.

** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc.

Many of these defines are also to be found in Apple's gl.h.
However the following are not:

#ifndef GL_NV_fence
#define GL_ALL_COMPLETED_NV 0x84F2
#define GL_FENCE_STATUS_NV 0x84F3
#define GL_FENCE_CONDITION_NV 0x84F4
#endif

also

#ifndef GL_EXT_texture_cube_map
#define GL_NORMAL_MAP_EXT 0x8511
#define GL_REFLECTION_MAP_EXT 0x8512
#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
#endif

Since they begin with GL_ I am assuming they are part of the official OpenGL spec and will at some time appear in gl.h. Or am I mistaken?

If they are part of the spec is there a newer gl.h from Apple than the one I DL'd as part of the OpenGL SDK? Or is there one on the developer CD's (I searched but didn't find one)?

IAC how safe would it be to use these by defining them myself on the assumption that they will appear and be supported in the Apple implementation?

respect....

Peter

DJ Tricky S
11-14-2000, 10:08 PM
The EXT at the end signifies that these are extensions to OpenGL and NOT standard. What I do for my x-platform code is to use nVidia's glext.h header file in all of my OpenGL apps, since it is rather comprehensive as far as defining miscellaneous constants for various extensions that you can use on the PC. This header file can be found in most (if not all) of nVidia's OpenGL demos on their website.