summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>1999-09-16 16:47:35 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>1999-09-16 16:47:35 +0000
commitdd4f70889464c9db132d75b3ab3cd3dbbdb9d3f2 (patch)
treef6adc264d00bfda0506727ff52988fca76864c44
parent9df2b25af1e795620909497ae7f3553834161a3c (diff)
GL_EXT_get_proc_address clean-up
-rw-r--r--include/GL/gl.h18
-rw-r--r--src/mesa/main/extensions.c10
2 files changed, 17 insertions, 11 deletions
diff --git a/include/GL/gl.h b/include/GL/gl.h
index 23aa596d37..a2c42ca6a8 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -1,4 +1,4 @@
-/* $Id: gl.h,v 1.2 1999/09/11 11:26:34 brianp Exp $ */
+/* $Id: gl.h,v 1.3 1999/09/16 16:48:27 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -2187,10 +2187,17 @@ GLAPI void GLAPIENTRY glLockArraysEXT( GLint first, GLsizei count );
GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
-/* GL_EXT_get_proc_address */
-typedef void (*GLfunction)();
-GLAPI GLfunction GLAPIENTRY glGetProcAddressEXT( const GLubyte *procName );
-
+/*
+ * GL_EXT_get_proc_address
+ *
+ * XXX this is a preliminary extension. It may change! Use at your
+ * own risk! Do not release code which uses this extension yet!
+ * If you want to try it out, #define GL_EXT_get_proc_address before
+ * #include <GL/gl.h>
+ */
+#ifdef GL_EXT_get_proc_address
+GLAPI void GLAPIENTRY (*glGetProcAddressEXT(const GLubyte *procName))();
+#endif
#if defined(__BEOS__) || defined(__QUICKDRAW__)
@@ -2224,7 +2231,6 @@ GLAPI GLfunction GLAPIENTRY glGetProcAddressEXT( const GLubyte *procName );
#define GL_PGI_misc_hints 1
#define GL_EXT_compiled_vertex_array 1
#define GL_EXT_clip_volume_hint 1
-#define GL_EXT_get_proc_address 1
#ifdef macintosh
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 606a75c1df..3130caccf8 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -1,4 +1,4 @@
-/* $Id: extensions.c,v 1.3 1999/09/11 11:48:11 brianp Exp $ */
+/* $Id: extensions.c,v 1.4 1999/09/16 16:47:35 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -203,8 +203,7 @@ const char *gl_extensions_get_string( GLcontext *ctx )
* NOTE: this function could be optimized to binary search a sorted
* list of function names.
* Also, this function does not yet do per-context function searches.
- * But since the client must also call glGetString(GL_EXTENSIONS) to
- * test for the extension this isn't a big deal.
+ * Not applicable to Mesa at this time.
*/
GLfunction gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName )
{
@@ -213,8 +212,9 @@ GLfunction gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName )
GLfunction address;
};
static struct proc procTable[] = {
+#ifdef GL_EXT_get_proc_address
{ "glGetProcAddressEXT", (GLfunction) glGetProcAddressEXT }, /* me! */
-
+#endif
/* OpenGL 1.1 functions */
{ "glEnableClientState", (GLfunction) glEnableClientState },
{ "glDisableClientState", (GLfunction) glDisableClientState },
@@ -377,7 +377,7 @@ GLfunction gl_GetProcAddress( GLcontext *ctx, const GLubyte *procName )
for (i = 0; procTable[i].address; i++) {
if (strcmp((const char *) procName, procTable[i].name) == 0)
- return procTable[i].address;
+ return procTable[i].address;
}
return NULL;