Somewhat normalized the style of this file.
Also moved the "glutMouseWheelFunc" extension down into the "extensions" part of the table. (Purely internal organization. It will still be found.) git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@313 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
d8b2c1d571
commit
85b7b49ead
@ -33,12 +33,14 @@
|
|||||||
#include "freeglut_internal.h"
|
#include "freeglut_internal.h"
|
||||||
|
|
||||||
|
|
||||||
struct name_address_pair {
|
struct name_address_pair
|
||||||
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
void *address;
|
void *address;
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct name_address_pair glut_functions[] = {
|
static struct name_address_pair glut_functions[] =
|
||||||
|
{
|
||||||
{ "glutInit", (void *) glutInit },
|
{ "glutInit", (void *) glutInit },
|
||||||
{ "glutInitDisplayMode", (void *) glutInitDisplayMode },
|
{ "glutInitDisplayMode", (void *) glutInitDisplayMode },
|
||||||
{ "glutInitDisplayString", (void *) glutInitDisplayString },
|
{ "glutInitDisplayString", (void *) glutInitDisplayString },
|
||||||
@ -87,7 +89,6 @@ static struct name_address_pair glut_functions[] = {
|
|||||||
{ "glutReshapeFunc", (void *) glutReshapeFunc },
|
{ "glutReshapeFunc", (void *) glutReshapeFunc },
|
||||||
{ "glutKeyboardFunc", (void *) glutKeyboardFunc },
|
{ "glutKeyboardFunc", (void *) glutKeyboardFunc },
|
||||||
{ "glutMouseFunc", (void *) glutMouseFunc },
|
{ "glutMouseFunc", (void *) glutMouseFunc },
|
||||||
{ "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
|
|
||||||
{ "glutMotionFunc", (void *) glutMotionFunc },
|
{ "glutMotionFunc", (void *) glutMotionFunc },
|
||||||
{ "glutPassiveMotionFunc", (void *) glutPassiveMotionFunc },
|
{ "glutPassiveMotionFunc", (void *) glutPassiveMotionFunc },
|
||||||
{ "glutEntryFunc", (void *) glutEntryFunc },
|
{ "glutEntryFunc", (void *) glutEntryFunc },
|
||||||
@ -174,6 +175,7 @@ static struct name_address_pair glut_functions[] = {
|
|||||||
{ "glutWireSierpinskiSponge ", (void *) glutWireSierpinskiSponge },
|
{ "glutWireSierpinskiSponge ", (void *) glutWireSierpinskiSponge },
|
||||||
{ "glutSolidSierpinskiSponge ", (void *) glutSolidSierpinskiSponge },
|
{ "glutSolidSierpinskiSponge ", (void *) glutSolidSierpinskiSponge },
|
||||||
{ "glutGetProcAddress", (void *) glutGetProcAddress },
|
{ "glutGetProcAddress", (void *) glutGetProcAddress },
|
||||||
|
{ "glutMouseWheelFunc", (void *) glutMouseWheelFunc },
|
||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -182,10 +184,9 @@ void * FGAPIENTRY glutGetProcAddress(const char *procName)
|
|||||||
{
|
{
|
||||||
/* Try GLUT functions first */
|
/* Try GLUT functions first */
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; glut_functions[i].name; i++) {
|
for( i = 0; glut_functions[ i ].name; i++ )
|
||||||
if( strcmp( glut_functions[ i ].name, procName ) == 0)
|
if( strcmp( glut_functions[ i ].name, procName ) == 0)
|
||||||
return glut_functions[ i ].address;
|
return glut_functions[ i ].address;
|
||||||
}
|
|
||||||
|
|
||||||
/* Try core GL functions */
|
/* Try core GL functions */
|
||||||
#if TARGET_HOST_WIN32
|
#if TARGET_HOST_WIN32
|
||||||
|
Reference in New Issue
Block a user