added GLX_EXT_get_proc_address

This commit is contained in:
Brian Paul
1999-09-11 11:33:45 +00:00
parent 585a68c82b
commit 89a42b7e73
3 changed files with 49 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: fakeglx.c,v 1.2 1999/09/03 11:53:33 keithw Exp $ */
/* $Id: fakeglx.c,v 1.3 1999/09/11 11:35:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -1472,3 +1472,29 @@ void Fake_glXDummyFunc( void )
(void) HPCR_DRGB;
(void) kernel1;
}
GLfunction Fake_glXGetProcAddress( const GLubyte *procName )
{
struct proc {
const char *name;
void *address;
};
static struct proc procTable[] = {
{ "glXGetProcAddressEXT", glXGetProcAddressEXT }, /* myself! */
{ "glXReleaseBuffersMESA", glXReleaseBuffersMESA },
{ "glXReleaseBuffersMESA", glXReleaseBuffersMESA },
{ "glXCopySubBufferMESA", glXCopySubBufferMESA },
/* NOTE: GLX_SGI_video_sync not implemented in Mesa */
{ NULL, NULL } /* end of list token */
};
GLuint i;
/* First, look for core library functions */
for (i = 0; procTable[i].address; i++) {
if (strcmp((const char *) procName, procTable[i].name) == 0)
return (GLfunction) procTable[i].address;
}
return NULL;
}

View File

@@ -1,4 +1,4 @@
/* $Id: glxapi.c,v 1.1 1999/08/19 00:55:42 jtg Exp $ */
/* $Id: glxapi.c,v 1.2 1999/09/11 11:35:11 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -403,3 +403,14 @@ int glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
}
#endif
#ifdef GLX_EXT_get_proc_address
GLfunction glXGetProcAddressEXT( const GLubyte *procName )
{
#ifdef REALGLX
return 0; /* XXX todo */
#endif
return Fake_glXGetProcAddress( procName );
}
#endif