clean-up of GLU_EXT_get_proc_address
This commit is contained in:
parent
dd4f708894
commit
978b089aee
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: glu.c,v 1.7 1999/09/14 00:11:40 brianp Exp $ */
|
/* $Id: glu.c,v 1.8 1999/09/16 16:53:28 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
|
@ -23,6 +23,9 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: glu.c,v $
|
* $Log: glu.c,v $
|
||||||
|
* Revision 1.8 1999/09/16 16:53:28 brianp
|
||||||
|
* clean-up of GLU_EXT_get_proc_address
|
||||||
|
*
|
||||||
* Revision 1.7 1999/09/14 00:11:40 brianp
|
* Revision 1.7 1999/09/14 00:11:40 brianp
|
||||||
* added gluCheckExtension()
|
* added gluCheckExtension()
|
||||||
*
|
*
|
||||||
|
@ -357,24 +360,24 @@ const GLubyte* GLAPIENTRY gluGetString( GLenum name )
|
||||||
|
|
||||||
#ifdef GLU_EXT_get_proc_address
|
#ifdef GLU_EXT_get_proc_address
|
||||||
|
|
||||||
GLfunction GLAPIENTRY gluGetProcAddressEXT( const GLubyte *procName )
|
void GLAPIENTRY (*gluGetProcAddressEXT(const GLubyte *procName))()
|
||||||
{
|
{
|
||||||
struct proc {
|
struct proc {
|
||||||
const char *name;
|
const char *name;
|
||||||
GLfunction address;
|
void *address;
|
||||||
};
|
};
|
||||||
static struct proc procTable[] = {
|
static struct proc procTable[] = {
|
||||||
{ "gluGetProcAddressEXT", (GLfunction) gluGetProcAddressEXT }, /* me! */
|
{ "gluGetProcAddressEXT", gluGetProcAddressEXT }, /* me! */
|
||||||
|
|
||||||
/* new 1.1 functions */
|
/* new 1.1 functions */
|
||||||
{ "gluGetString", (GLfunction) gluGetString },
|
{ "gluGetString", gluGetString },
|
||||||
|
|
||||||
/* new 1.2 functions */
|
/* new 1.2 functions */
|
||||||
{ "gluTessBeginPolygon", (GLfunction) gluTessBeginPolygon },
|
{ "gluTessBeginPolygon", gluTessBeginPolygon },
|
||||||
{ "gluTessBeginContour", (GLfunction) gluTessBeginContour },
|
{ "gluTessBeginContour", gluTessBeginContour },
|
||||||
{ "gluTessEndContour", (GLfunction) gluTessEndContour },
|
{ "gluTessEndContour", gluTessEndContour },
|
||||||
{ "gluTessEndPolygon", (GLfunction) gluTessEndPolygon },
|
{ "gluTessEndPolygon", gluTessEndPolygon },
|
||||||
{ "gluGetTessProperty", (GLfunction) gluGetTessProperty },
|
{ "gluGetTessProperty", gluGetTessProperty },
|
||||||
|
|
||||||
/* new 1.3 functions */
|
/* new 1.3 functions */
|
||||||
|
|
||||||
|
@ -384,7 +387,7 @@ GLfunction GLAPIENTRY gluGetProcAddressEXT( const GLubyte *procName )
|
||||||
|
|
||||||
for (i = 0; procTable[i].address; i++) {
|
for (i = 0; procTable[i].address; i++) {
|
||||||
if (strcmp((const char *) procName, procTable[i].name) == 0)
|
if (strcmp((const char *) procName, procTable[i].name) == 0)
|
||||||
return procTable[i].address;
|
return (void (*)()) procTable[i].address;
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue