-/* $Id: gl.h,v 1.5 1999/09/17 04:25:56 tjump Exp $ */
+/* $Id: gl.h,v 1.6 1999/09/17 12:21:36 brianp Exp $ */
/*
* Mesa 3-D graphics library
* If you want to try it out, #define GL_EXT_get_proc_address before
* #include <GL/gl.h>
*/
+#define GL_EXT_get_proc_address 1
#ifdef GL_EXT_get_proc_address
-typedef (void (GLAPIENTRY *glProcAddress))();
-glProcAddress GLAPIENTRY glGetProcAddressEXT(const GLubyte *procName);
+#ifdef __WIN32__
+ typedef (void GLAPIENTRY *glProcAddress)();
+ glProcAddress GLAPIENTRY glGetProcAddressEXT(const GLubyte *procName);
+#else
+ /* everything but Windows */
+ GLAPI void GLAPIENTRY (*glGetProcAddressEXT(const GLubyte *procName))();
+#endif
#endif
-/* $Id: glu.h,v 1.7 1999/09/17 02:44:19 tjump Exp $ */
+/* $Id: glu.h,v 1.8 1999/09/17 12:21:36 brianp Exp $ */
/*
* Mesa 3-D graphics library
/*
* $Log: glu.h,v $
+ * Revision 1.8 1999/09/17 12:21:36 brianp
+ * glGetProcAddressEXT changes to accomodate Win32 and non-Win32
+ *
* Revision 1.7 1999/09/17 02:44:19 tjump
* I changed the xxxGetProcAddressEXT function declarations to be more
* MSVC friendly. Brianp - could you verify that they describe and operate
* which uses this extension yet! It may change!
*/
#define GLU_EXT_get_proc_address 1
-typedef (GLAPIENTRY *gluProcAddress)();
-gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName);
-
+#ifdef __WIN32__
+ typedef (void (GLAPIENTRY *gluProcAddress))();
+ gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName);
+#else
+ GLUAPI void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))();
+#endif
-/* $Id: glu.c,v 1.13 1999/09/17 03:17:18 tjump Exp $ */
+/* $Id: glu.c,v 1.14 1999/09/17 12:21:53 brianp Exp $ */
/*
* Mesa 3-D graphics library
/*
* $Log: glu.c,v $
+ * Revision 1.14 1999/09/17 12:21:53 brianp
+ * glGetProcAddressEXT changes to accomodate Win32 and non-Win32
+ *
* Revision 1.13 1999/09/17 03:17:18 tjump
* Patch error fixup
*
#ifdef GLU_EXT_get_proc_address
#ifdef __cplusplus
-/* for BeOS R4.5 */
-gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
+ /* for BeOS R4.5 */
+ void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))(...)
+#elif defined(__WIN32__)
+ gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
#else
-gluProcAddress GLAPIENTRY gluGetProcAddressEXT(const GLubyte *procName)
+ void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()
#endif
{
struct proc {
for (i = 0; procTable[i].address; i++) {
if (strcmp((const char *) procName, procTable[i].name) == 0)
+#ifdef __WIN32__
return (gluProcAddress) procTable[i].address;
+#else
+ return (void (*)()) procTable[i].address;
+#endif
}
return NULL;