added GLU_EXT_get_proc_address
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: glu.h,v 1.2 1999/09/10 02:08:18 gareth Exp $ */
|
/* $Id: glu.h,v 1.3 1999/09/11 11:34:21 brianp Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -23,6 +23,9 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* $Log: glu.h,v $
|
* $Log: glu.h,v $
|
||||||
|
* Revision 1.3 1999/09/11 11:34:21 brianp
|
||||||
|
* added GLU_EXT_get_proc_address
|
||||||
|
*
|
||||||
* Revision 1.2 1999/09/10 02:08:18 gareth
|
* Revision 1.2 1999/09/10 02:08:18 gareth
|
||||||
* Added GLU 1.3 tessellation (except winding rule code).
|
* Added GLU 1.3 tessellation (except winding rule code).
|
||||||
*
|
*
|
||||||
@@ -481,6 +484,22 @@ GLUAPI void GLAPIENTRY gluEndPolygon( GLUtesselator *tobj );
|
|||||||
GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
|
GLUAPI const GLubyte* GLAPIENTRY gluGetString( GLenum name );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* GLU_EXT_get_proc_address extensions
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef GL_EXT_get_proc_address
|
||||||
|
/* This extension requires GL_EXT_get_proc_address */
|
||||||
|
|
||||||
|
GLUAPI GLfunction GLAPIENTRY gluGetProcAddressEXT( const GLubyte *procName );
|
||||||
|
|
||||||
|
#define GLU_EXT_get_proc_address 1
|
||||||
|
|
||||||
|
#endif /* GL_EXT_get_proc_address */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(__BEOS__) || defined(__QUICKDRAW__)
|
#if defined(__BEOS__) || defined(__QUICKDRAW__)
|
||||||
#pragma export off
|
#pragma export off
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: glu.c,v 1.3 1999/09/10 04:32:10 gareth Exp $ */
|
/* $Id: glu.c,v 1.4 1999/09/11 11:36:26 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.4 1999/09/11 11:36:26 brianp
|
||||||
|
* added GLU_EXT_get_proc_address
|
||||||
|
*
|
||||||
* Revision 1.3 1999/09/10 04:32:10 gareth
|
* Revision 1.3 1999/09/10 04:32:10 gareth
|
||||||
* Fixed triangle output, recovery process termination.
|
* Fixed triangle output, recovery process termination.
|
||||||
*
|
*
|
||||||
@@ -325,7 +328,7 @@ const GLubyte* GLAPIENTRY gluErrorString( GLenum errorCode )
|
|||||||
|
|
||||||
const GLubyte* GLAPIENTRY gluGetString( GLenum name )
|
const GLubyte* GLAPIENTRY gluGetString( GLenum name )
|
||||||
{
|
{
|
||||||
static char *extensions = "GL_EXT_abgr";
|
static char *extensions = "GL_EXT_abgr GLU_EXT_get_proc_address";
|
||||||
static char *version = "1.1 Mesa 3.1";
|
static char *version = "1.1 Mesa 3.1";
|
||||||
|
|
||||||
switch (name) {
|
switch (name) {
|
||||||
@@ -338,3 +341,29 @@ const GLubyte* GLAPIENTRY gluGetString( GLenum name )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef GLU_EXT_get_proc_address
|
||||||
|
|
||||||
|
GLfunction GLAPIENTRY gluGetProcAddressEXT( const GLubyte *procName )
|
||||||
|
{
|
||||||
|
struct proc {
|
||||||
|
const char *name;
|
||||||
|
void *address;
|
||||||
|
};
|
||||||
|
static struct proc procTable[] = {
|
||||||
|
{ "gluGetProcAddressEXT", (void *) gluGetProcAddressEXT }, /* myself! */
|
||||||
|
{ NULL, NULL }
|
||||||
|
};
|
||||||
|
GLuint i;
|
||||||
|
|
||||||
|
for (i = 0; procTable[i].address; i++) {
|
||||||
|
if (strcmp((const char *) procName, procTable[i].name) == 0)
|
||||||
|
return (GLfunction) procTable[i].address;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user