define in glut.h
/* GLUT initialization sub-API. */
extern void APIENTRY glutInit(int *argcp, char **argv);
extern void APIENTRY glutInitDisplayMode(unsigned int mode);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
extern void APIENTRY glutInitDisplayString(const char *string);
#endif
extern void APIENTRY glutInitWindowPosition(int x, int y);
extern void APIENTRY glutInitWindowSize(int width, int height);
extern void APIENTRY glutMainLoop(void);
/* GLUT window sub-API. */
extern int APIENTRY glutCreateWindow(const char *title);
extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
extern void APIENTRY glutDestroyWindow(int win);
extern void APIENTRY glutPostRedisplay(void);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
extern void APIENTRY glutPostWindowRedisplay(int win);
#endif
extern void APIENTRY glutSwapBuffers(void);
extern int APIENTRY glutGetWindow(void);
extern void APIENTRY glutSetWindow(int win);
extern void APIENTRY glutSetWindowTitle(const char *title);
extern void APIENTRY glutSetIconTitle(const char *title);
extern void APIENTRY glutPositionWindow(int x, int y);
extern void APIENTRY glutReshapeWindow(int width, int height);
extern void APIENTRY glutPopWindow(void);
extern void APIENTRY glutPushWindow(void);
extern void APIENTRY glutIconifyWindow(void);
extern void APIENTRY glutShowWindow(void);
extern void APIENTRY glutHideWindow(void);
#if (GLUT_API_VERSION >= 3)
extern void APIENTRY glutFullScreen(void);
extern void APIENTRY glutSetCursor(int cursor);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
extern void APIENTRY glutWarpPointer(int x, int y);
#endif
/* GLUT overlay sub-API. */
extern void APIENTRY glutEstablishOverlay(void);
extern void APIENTRY glutRemoveOverlay(void);
extern void APIENTRY glutUseLayer(GLenum layer);
extern void APIENTRY glutPostOverlayRedisplay(void);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
extern void APIENTRY glutPostWindowOverlayRedisplay(int win);
#endif
extern void APIENTRY glutShowOverlay(void);
extern void APIENTRY glutHideOverlay(void);
#endif
/* GLUT menu sub-API. */
extern int APIENTRY glutCreateMenu(void (*)(int));
extern void APIENTRY glutDestroyMenu(int menu);
extern int APIENTRY glutGetMenu(void);
extern void APIENTRY glutSetMenu(int menu);
extern void APIENTRY glutAddMenuEntry(const char *label, int value);
extern void APIENTRY glutAddSubMenu(const char *label, int submenu);
extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
extern void APIENTRY glutRemoveMenuItem(int item);
extern void APIENTRY glutAttachMenu(int button);
extern void APIENTRY glutDetachMenu(int button);
/* GLUT window callback sub-API. */
extern void APIENTRY glutDisplayFunc(void (*func)(void));
extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height));
extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y));
extern void APIENTRY glutMotionFunc(void (*func)(int x, int y));
extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y));
extern void APIENTRY glutEntryFunc(void (*func)(int state));
extern void APIENTRY glutVisibilityFunc(void (*func)(int state));
extern void APIENTRY glutIdleFunc(void (*func)(void));
extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value);
extern void APIENTRY glutMenuStateFunc(void (*func)(int state));
#if (GLUT_API_VERSION >= 2)
extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y));
extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z));
extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z));
extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state));
extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state));
extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value));
extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y));
extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y));
#if (GLUT_API_VERSION >= 3)
extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y));
extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void));
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
extern void APIENTRY glutWindowStatusFunc(void (*func)(int state));
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y));
extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y));
extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
#endif
#endif
#endif
/* GLUT color index sub-API. */
extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
extern GLfloat APIENTRY glutGetColor(int ndx, int component);
extern void APIENTRY glutCopyColormap(int win);
/* GLUT state retrieval sub-API. */
extern int APIENTRY glutGet(GLenum type);
extern int APIENTRY glutDeviceGet(GLenum type);
#if (GLUT_API_VERSION >= 2)
/* GLUT extension support sub-API */
extern int APIENTRY glutExtensionSupported(const char *name);
#endif
#if (GLUT_API_VERSION >= 3)
extern int APIENTRY glutGetModifiers(void);
extern int APIENTRY glutLayerGet(GLenum type);
#endif
/* GLUT font sub-API */
extern void APIENTRY glutBitmapCharacter(void *font, int character);
extern int APIENTRY glutBitmapWidth(void *font, int character);
extern void APIENTRY glutStrokeCharacter(void *font, int character);
extern int APIENTRY glutStrokeWidth(void *font, int character);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
#endif
/* GLUT pre-built models sub-API */
extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
extern void APIENTRY glutWireCube(GLdouble size);
extern void APIENTRY glutSolidCube(GLdouble size);
extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
extern void APIENTRY glutWireDodecahedron(void);
extern void APIENTRY glutSolidDodecahedron(void);
extern void APIENTRY glutWireTeapot(GLdouble size);
extern void APIENTRY glutSolidTeapot(GLdouble size);
extern void APIENTRY glutWireOctahedron(void);
extern void APIENTRY glutSolidOctahedron(void);
extern void APIENTRY glutWireTetrahedron(void);
extern void APIENTRY glutSolidTetrahedron(void);
extern void APIENTRY glutWireIcosahedron(void);
extern void APIENTRY glutSolidIcosahedron(void);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
/* GLUT video resize sub-API. */
extern int APIENTRY glutVideoResizeGet(GLenum param);
extern void APIENTRY glutSetupVideoResizing(void);
extern void APIENTRY glutStopVideoResizing(void);
extern void APIENTRY glutVideoResize(int x, int y, int width, int height);
extern void APIENTRY glutVideoPan(int x, int y, int width, int height);
/* GLUT debugging sub-API. */
extern void APIENTRY glutReportErrors(void);
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
/* GLUT device control sub-API. */
/* glutSetKeyRepeat modes. */
#define GLUT_KEY_REPEAT_OFF 0
#define GLUT_KEY_REPEAT_ON 1
#define GLUT_KEY_REPEAT_DEFAULT 2
/* Joystick button masks. */
#define GLUT_JOYSTICK_BUTTON_A 1
#define GLUT_JOYSTICK_BUTTON_B 2
#define GLUT_JOYSTICK_BUTTON_C 4
#define GLUT_JOYSTICK_BUTTON_D 8
extern void APIENTRY glutIgnoreKeyRepeat(int ignore);
extern void APIENTRY glutSetKeyRepeat(int repeatMode);
extern void APIENTRY glutForceJoystickFunc(void);
/* GLUT game mode sub-API. */
/* glutGameModeGet. */
#define GLUT_GAME_MODE_ACTIVE 0
#define GLUT_GAME_MODE_POSSIBLE 1
#define GLUT_GAME_MODE_WIDTH 2
#define GLUT_GAME_MODE_HEIGHT 3
#define GLUT_GAME_MODE_PIXEL_DEPTH 4
#define GLUT_GAME_MODE_REFRESH_RATE 5
#define GLUT_GAME_MODE_DISPLAY_CHANGED 6
extern void APIENTRY glutGameModeString(const char *string);
extern int APIENTRY glutEnterGameMode(void);
extern void APIENTRY glutLeaveGameMode(void);
extern int APIENTRY glutGameModeGet(GLenum mode);
复制代码