1 #ifndef __FREEGLUT_EXT_H__
2 #define __FREEGLUT_EXT_H__
7 * The non-GLUT-compatible extensions to the freeglut library include file
9 * Copyright (c) 1999-2000 Pawel W. Olszta. All Rights Reserved.
10 * Written by Pawel W. Olszta, <olszta@sourceforge.net>
11 * Creation date: Thu Dec 2 1999
13 * Permission is hereby granted, free of charge, to any person obtaining a
14 * copy of this software and associated documentation files (the "Software"),
15 * to deal in the Software without restriction, including without limitation
16 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17 * and/or sell copies of the Software, and to permit persons to whom the
18 * Software is furnished to do so, subject to the following conditions:
20 * The above copyright notice and this permission notice shall be included
21 * in all copies or substantial portions of the Software.
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
24 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26 * PAWEL W. OLSZTA BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
27 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
28 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
36 * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
38 #define GLUT_ACTION_EXIT 0
39 #define GLUT_ACTION_GLUTMAINLOOP_RETURNS 1
40 #define GLUT_ACTION_CONTINUE_EXECUTION 2
43 * Create a new rendering context when the user opens a new window?
45 #define GLUT_CREATE_NEW_CONTEXT 0
46 #define GLUT_USE_CURRENT_CONTEXT 1
49 * Direct/Indirect rendering context options (has meaning only in Unix/X11)
51 #define GLUT_FORCE_INDIRECT_CONTEXT 0
52 #define GLUT_ALLOW_DIRECT_CONTEXT 1
53 #define GLUT_TRY_DIRECT_CONTEXT 2
54 #define GLUT_FORCE_DIRECT_CONTEXT 3
57 * GLUT API Extension macro definitions -- the glutGet parameters
59 #define GLUT_INIT_STATE 0x007C
61 #define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9
63 #define GLUT_WINDOW_BORDER_WIDTH 0x01FA
64 #define GLUT_WINDOW_HEADER_HEIGHT 0x01FB
66 #define GLUT_VERSION 0x01FC
68 #define GLUT_RENDERING_CONTEXT 0x01FD
69 #define GLUT_DIRECT_RENDERING 0x01FE
72 * New tokens for glutInitDisplayMode.
73 * Only one GLUT_AUXn bit may be used at a time.
74 * Value 0x0400 is defined in OpenGLUT.
76 #define GLUT_AUX1 0x1000
77 #define GLUT_AUX2 0x2000
78 #define GLUT_AUX3 0x4000
79 #define GLUT_AUX4 0x8000
82 * Process loop function, see freeglut_main.c
84 FGAPI void FGAPIENTRY glutMainLoopEvent( void );
85 FGAPI void FGAPIENTRY glutLeaveMainLoop( void );
86 FGAPI void FGAPIENTRY glutExit ( void );
89 * Window-specific callback functions, see freeglut_callbacks.c
91 FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
92 FGAPI void FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
93 FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
94 /* A. Donev: Also a destruction callback for menus */
95 FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );
98 * State setting and retrieval functions, see freeglut_state.c
100 FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value );
101 /* A.Donev: User-data manipulation */
102 FGAPI void* FGAPIENTRY glutGetWindowData( void );
103 FGAPI void FGAPIENTRY glutSetWindowData(void* data);
104 FGAPI void* FGAPIENTRY glutGetMenuData( void );
105 FGAPI void FGAPIENTRY glutSetMenuData(void* data);
108 * Font stuff, see freeglut_font.c
110 FGAPI int FGAPIENTRY glutBitmapHeight( void* font );
111 FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
112 FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *string );
113 FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string );
116 * Geometry functions, see freeglut_geometry.c
118 FGAPI void FGAPIENTRY glutWireRhombicDodecahedron( void );
119 FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron( void );
120 FGAPI void FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale );
121 FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale );
122 FGAPI void FGAPIENTRY glutWireCylinder( GLdouble radius, GLdouble height, GLint slices, GLint stacks);
123 FGAPI void FGAPIENTRY glutSolidCylinder( GLdouble radius, GLdouble height, GLint slices, GLint stacks);
126 * Extension functions, see freeglut_ext.c
128 typedef void (*GLUTproc)();
129 FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );
132 * Joystick functions, see freeglut_joystick.c
134 /* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */
135 /* If you have a serious need for these functions in your application, please either
136 * contact the "freeglut" developer community at freeglut-developer@lists.sourceforge.net,
137 * switch to the OpenGLUT library, or else port your joystick functionality over to PLIB's
140 int glutJoystickGetNumAxes( int ident );
141 int glutJoystickGetNumButtons( int ident );
142 int glutJoystickNotWorking( int ident );
143 float glutJoystickGetDeadBand( int ident, int axis );
144 void glutJoystickSetDeadBand( int ident, int axis, float db );
145 float glutJoystickGetSaturation( int ident, int axis );
146 void glutJoystickSetSaturation( int ident, int axis, float st );
147 void glutJoystickSetMinRange( int ident, float *axes );
148 void glutJoystickSetMaxRange( int ident, float *axes );
149 void glutJoystickSetCenter( int ident, float *axes );
150 void glutJoystickGetMinRange( int ident, float *axes );
151 void glutJoystickGetMaxRange( int ident, float *axes );
152 void glutJoystickGetCenter( int ident, float *axes );
158 /*** END OF FILE ***/
160 #endif /* __FREEGLUT_EXT_H__ */