summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2002-04-04 16:58:04 +0000
committerBrian Paul <[email protected]>2002-04-04 16:58:04 +0000
commit01dc182ee86922845ba0b17a2cda9af19150c93a (patch)
tree45b0b0cb76d49fdf36f7be3c0bcdb99bfa19ce92 /src
parent486734a5d50ff9114b567b5e9eac6337248a80e6 (diff)
added OSMesaGetProcAddress()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/osmesa/osmesa.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c
index b7b667dd739..4fdf290383f 100644
--- a/src/mesa/drivers/osmesa/osmesa.c
+++ b/src/mesa/drivers/osmesa/osmesa.c
@@ -1,4 +1,4 @@
-/* $Id: osmesa.c,v 1.77 2002/04/04 00:54:02 brianp Exp $ */
+/* $Id: osmesa.c,v 1.78 2002/04/04 16:58:04 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -621,6 +621,39 @@ OSMesaGetColorBuffer( OSMesaContext c, GLint *width,
}
}
+
+
+struct name_address {
+ const char *Name;
+ GLvoid *Address;
+};
+
+static struct name_address functions[] = {
+ { "OSMesaCreateContext", (void *) OSMesaCreateContext },
+ { "OSMesaCreateContextExt", (void *) OSMesaCreateContextExt },
+ { "OSMesaDestroyContext", (void *) OSMesaDestroyContext },
+ { "OSMesaMakeCurrent", (void *) OSMesaMakeCurrent },
+ { "OSMesaGetCurrentContext", (void *) OSMesaGetCurrentContext },
+ { "OSMesaPixelsStore", (void *) OSMesaPixelStore },
+ { "OSMesaGetIntegerv", (void *) OSMesaGetIntegerv },
+ { "OSMesaGetDepthBuffer", (void *) OSMesaGetDepthBuffer },
+ { "OSMesaGetColorBuffer", (void *) OSMesaGetColorBuffer },
+ { "OSMesaGetProcAddress", (void *) OSMesaGetProcAddress },
+ { NULL, NULL }
+};
+
+GLAPI void * GLAPIENTRY
+OSMesaGetProcAddress( const char *funcName )
+{
+ int i;
+ for (i = 0; functions[i].Name; i++) {
+ if (strcmp(functions[i].Name, funcName) == 0)
+ return (void *) functions[i].Address;
+ }
+ return (void *) _glapi_get_proc_address(funcName);
+}
+
+
/**********************************************************************/
/*** Device Driver Functions ***/
/**********************************************************************/