Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
freeglut_ext.h
Go to the documentation of this file.
1 #ifndef __FREEGLUT_EXT_H__
2 #define __FREEGLUT_EXT_H__
3 
4 /*
5  * freeglut_ext.h
6  *
7  * The non-GLUT-compatible extensions to the freeglut library include file
8  *
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
12  *
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:
19  *
20  * The above copyright notice and this permission notice shall be included
21  * in all copies or substantial portions of the Software.
22  *
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.
29  */
30 
31 #ifdef __cplusplus
32  extern "C" {
33 #endif
34 
35 /*
36  * Additional GLUT Key definitions for the Special key function
37  */
38 #define GLUT_KEY_NUM_LOCK 0x006D
39 #define GLUT_KEY_BEGIN 0x006E
40 #define GLUT_KEY_DELETE 0x006F
41 #define GLUT_KEY_SHIFT_L 0x0070
42 #define GLUT_KEY_SHIFT_R 0x0071
43 #define GLUT_KEY_CTRL_L 0x0072
44 #define GLUT_KEY_CTRL_R 0x0073
45 #define GLUT_KEY_ALT_L 0x0074
46 #define GLUT_KEY_ALT_R 0x0075
47 
48 /*
49  * GLUT API Extension macro definitions -- behaviour when the user clicks on an "x" to close a window
50  */
51 #define GLUT_ACTION_EXIT 0
52 #define GLUT_ACTION_GLUTMAINLOOP_RETURNS 1
53 #define GLUT_ACTION_CONTINUE_EXECUTION 2
54 
55 /*
56  * Create a new rendering context when the user opens a new window?
57  */
58 #define GLUT_CREATE_NEW_CONTEXT 0
59 #define GLUT_USE_CURRENT_CONTEXT 1
60 
61 /*
62  * Direct/Indirect rendering context options (has meaning only in Unix/X11)
63  */
64 #define GLUT_FORCE_INDIRECT_CONTEXT 0
65 #define GLUT_ALLOW_DIRECT_CONTEXT 1
66 #define GLUT_TRY_DIRECT_CONTEXT 2
67 #define GLUT_FORCE_DIRECT_CONTEXT 3
68 
69 /*
70  * GLUT API Extension macro definitions -- the glutGet parameters
71  */
72 #define GLUT_INIT_STATE 0x007C
73 
74 #define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9
75 
76 #define GLUT_WINDOW_BORDER_WIDTH 0x01FA
77 #define GLUT_WINDOW_BORDER_HEIGHT 0x01FB
78 #define GLUT_WINDOW_HEADER_HEIGHT 0x01FB /* Docs say it should always have been GLUT_WINDOW_BORDER_HEIGHT, keep this for backward compatibility */
79 
80 #define GLUT_VERSION 0x01FC
81 
82 #define GLUT_RENDERING_CONTEXT 0x01FD
83 #define GLUT_DIRECT_RENDERING 0x01FE
84 
85 #define GLUT_FULL_SCREEN 0x01FF
86 
87 #define GLUT_SKIP_STALE_MOTION_EVENTS 0x0204
88 
89 /*
90  * New tokens for glutInitDisplayMode.
91  * Only one GLUT_AUXn bit may be used at a time.
92  * Value 0x0400 is defined in OpenGLUT.
93  */
94 #define GLUT_AUX 0x1000
95 
96 #define GLUT_AUX1 0x1000
97 #define GLUT_AUX2 0x2000
98 #define GLUT_AUX3 0x4000
99 #define GLUT_AUX4 0x8000
100 
101 /*
102  * Context-related flags, see freeglut_state.c
103  */
104 #define GLUT_INIT_MAJOR_VERSION 0x0200
105 #define GLUT_INIT_MINOR_VERSION 0x0201
106 #define GLUT_INIT_FLAGS 0x0202
107 #define GLUT_INIT_PROFILE 0x0203
108 
109 /*
110  * Flags for glutInitContextFlags, see freeglut_init.c
111  */
112 #define GLUT_DEBUG 0x0001
113 #define GLUT_FORWARD_COMPATIBLE 0x0002
114 
115 
116 /*
117  * Flags for glutInitContextProfile, see freeglut_init.c
118  */
119 #define GLUT_CORE_PROFILE 0x0001
120 #define GLUT_COMPATIBILITY_PROFILE 0x0002
121 
122 /*
123  * Process loop function, see freeglut_main.c
124  */
127 FGAPI void FGAPIENTRY glutExit ( void );
128 
129 /*
130  * Window management functions, see freeglut_window.c
131  */
134 
135 /*
136  * Window-specific callback functions, see freeglut_callbacks.c
137  */
138 FGAPI void FGAPIENTRY glutMouseWheelFunc( void (* callback)( int, int, int, int ) );
139 FGAPI void FGAPIENTRY glutCloseFunc( void (* callback)( void ) );
140 FGAPI void FGAPIENTRY glutWMCloseFunc( void (* callback)( void ) );
141 /* A. Donev: Also a destruction callback for menus */
142 FGAPI void FGAPIENTRY glutMenuDestroyFunc( void (* callback)( void ) );
143 
144 /*
145  * State setting and retrieval functions, see freeglut_state.c
146  */
147 FGAPI void FGAPIENTRY glutSetOption ( GLenum option_flag, int value );
148 FGAPI int * FGAPIENTRY glutGetModeValues(GLenum mode, int * size);
149 /* A.Donev: User-data manipulation */
154 
155 /*
156  * Font stuff, see freeglut_font.c
157  */
159 FGAPI GLfloat FGAPIENTRY glutStrokeHeight( void* font );
160 FGAPI void FGAPIENTRY glutBitmapString( void* font, const unsigned char *string );
161 FGAPI void FGAPIENTRY glutStrokeString( void* font, const unsigned char *string );
162 
163 /*
164  * Geometry functions, see freeglut_geometry.c
165  */
168 FGAPI void FGAPIENTRY glutWireSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale );
169 FGAPI void FGAPIENTRY glutSolidSierpinskiSponge ( int num_levels, GLdouble offset[3], GLdouble scale );
170 FGAPI void FGAPIENTRY glutWireCylinder( GLdouble radius, GLdouble height, GLint slices, GLint stacks);
171 FGAPI void FGAPIENTRY glutSolidCylinder( GLdouble radius, GLdouble height, GLint slices, GLint stacks);
172 
173 /*
174  * Extension functions, see freeglut_ext.c
175  */
176 typedef void (*GLUTproc)();
177 FGAPI GLUTproc FGAPIENTRY glutGetProcAddress( const char *procName );
178 
179 /*
180  * Multi-touch/multi-pointer extensions
181  */
182 
183 #define GLUT_HAS_MULTI 1
184 
185 FGAPI void FGAPIENTRY glutMultiEntryFunc( void (* callback)( int, int ) );
186 FGAPI void FGAPIENTRY glutMultiButtonFunc( void (* callback)( int, int, int, int, int ) );
187 FGAPI void FGAPIENTRY glutMultiMotionFunc( void (* callback)( int, int, int ) );
188 FGAPI void FGAPIENTRY glutMultiPassiveFunc( void (* callback)( int, int, int ) );
189 
190 /*
191  * Joystick functions, see freeglut_joystick.c
192  */
193 /* USE OF THESE FUNCTIONS IS DEPRECATED !!!!! */
194 /* If you have a serious need for these functions in your application, please either
195  * contact the "freeglut" developer community at freeglut-developer@lists.sourceforge.net,
196  * switch to the OpenGLUT library, or else port your joystick functionality over to PLIB's
197  * "js" library.
198  */
199 int glutJoystickGetNumAxes( int ident );
200 int glutJoystickGetNumButtons( int ident );
201 int glutJoystickNotWorking( int ident );
202 float glutJoystickGetDeadBand( int ident, int axis );
203 void glutJoystickSetDeadBand( int ident, int axis, float db );
204 float glutJoystickGetSaturation( int ident, int axis );
205 void glutJoystickSetSaturation( int ident, int axis, float st );
206 void glutJoystickSetMinRange( int ident, float *axes );
207 void glutJoystickSetMaxRange( int ident, float *axes );
208 void glutJoystickSetCenter( int ident, float *axes );
209 void glutJoystickGetMinRange( int ident, float *axes );
210 void glutJoystickGetMaxRange( int ident, float *axes );
211 void glutJoystickGetCenter( int ident, float *axes );
212 
213 /*
214  * Initialization functions, see freeglut_init.c
215  */
216 FGAPI void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion );
219 
220 /* to get the typedef for va_list */
221 #include <stdarg.h>
222 
223 FGAPI void FGAPIENTRY glutInitErrorFunc( void (* vError)( const char *fmt, va_list ap ) );
224 FGAPI void FGAPIENTRY glutInitWarningFunc( void (* vWarning)( const char *fmt, va_list ap ) );
225 
226 /*
227  * GLUT API macro definitions -- the display mode definitions
228  */
229 #define GLUT_CAPTIONLESS 0x0400
230 #define GLUT_BORDERLESS 0x0800
231 #define GLUT_SRGB 0x1000
232 
233 #ifdef __cplusplus
234  }
235 #endif
236 
237 /*** END OF FILE ***/
238 
239 #endif /* __FREEGLUT_EXT_H__ */
Using X files without the sources and the makefile How to use you just create a debug directory e the sample3 directory must contain Sample3 Final Sample3 exe Sample3 Final Debug Sample3 Final Gfx OpenGL bmp Sample3 Final Gfx tiny_skin bmp Sample3 Final Gfx tiny_4anim x The source files have the DevCpp project file plus the makefile The demos use standard FreeGlut functions Technical without warranty Neither Paul Coppens nor GameDev net make any or either express or with respect to the their or fitness for a specific purpose neither Paul Coppens nor GameDev net shall have any liability to you or any other person or entity with respect to any or damage caused or alleged to have been caused directly or indirectly by the programs provided by Paul Coppens and GameDev net This but is not limited interruption of loss of data
Definition: Readme.txt:39
FGAPI void FGAPIENTRY glutWireRhombicDodecahedron(void)
int glutJoystickNotWorking(int ident)
FGAPI void FGAPIENTRY glutInitContextFlags(int flags)
FGAPI void FGAPIENTRY glutSetOption(GLenum option_flag, int value)
FGAPI void FGAPIENTRY glutFullScreenToggle(void)
void glutJoystickSetSaturation(int ident, int axis, float st)
FGAPI void FGAPIENTRY glutWMCloseFunc(void(*callback)(void))
void glutJoystickSetMinRange(int ident, float *axes)
int glutJoystickGetNumButtons(int ident)
FGAPI void FGAPIENTRY glutLeaveFullScreen(void)
FGAPI void *FGAPIENTRY glutGetMenuData(void)
void glutJoystickSetCenter(int ident, float *axes)
FGAPI void FGAPIENTRY glutExit(void)
void(* GLUTproc)()
Definition: freeglut_ext.h:176
FGAPI void FGAPIENTRY glutBitmapString(void *font, const unsigned char *string)
FGAPI void FGAPIENTRY glutLeaveMainLoop(void)
FGAPI void FGAPIENTRY glutMultiButtonFunc(void(*callback)(int, int, int, int, int))
FGAPI void FGAPIENTRY glutSolidSierpinskiSponge(int num_levels, GLdouble offset[3], GLdouble scale)
FGAPI void *FGAPIENTRY glutGetWindowData(void)
FGAPI int FGAPIENTRY glutBitmapHeight(void *font)
FGAPI void FGAPIENTRY glutSolidRhombicDodecahedron(void)
void glutJoystickSetMaxRange(int ident, float *axes)
void glutJoystickSetDeadBand(int ident, int axis, float db)
FGAPI void FGAPIENTRY glutMainLoopEvent(void)
FGAPI void FGAPIENTRY glutWireSierpinskiSponge(int num_levels, GLdouble offset[3], GLdouble scale)
float glutJoystickGetSaturation(int ident, int axis)
FGAPI void FGAPIENTRY glutSolidCylinder(GLdouble radius, GLdouble height, GLint slices, GLint stacks)
FGAPI void FGAPIENTRY glutSetWindowData(void *data)
void glutJoystickGetMinRange(int ident, float *axes)
FGAPI void FGAPIENTRY glutMouseWheelFunc(void(*callback)(int, int, int, int))
FGAPI int *FGAPIENTRY glutGetModeValues(GLenum mode, int *size)
FGAPI void FGAPIENTRY glutWireCylinder(GLdouble radius, GLdouble height, GLint slices, GLint stacks)
FGAPI void FGAPIENTRY glutStrokeString(void *font, const unsigned char *string)
FGAPI GLfloat FGAPIENTRY glutStrokeHeight(void *font)
FGAPI void FGAPIENTRY glutInitWarningFunc(void(*vWarning)(const char *fmt, va_list ap))
int glutJoystickGetNumAxes(int ident)
FGAPI void FGAPIENTRY glutInitContextVersion(int majorVersion, int minorVersion)
FGAPI void FGAPIENTRY glutInitErrorFunc(void(*vError)(const char *fmt, va_list ap))
void glutJoystickGetCenter(int ident, float *axes)
FGAPI void FGAPIENTRY glutInitContextProfile(int profile)
FGAPI void FGAPIENTRY glutMultiMotionFunc(void(*callback)(int, int, int))
void glutJoystickGetMaxRange(int ident, float *axes)
FGAPI GLUTproc FGAPIENTRY glutGetProcAddress(const char *procName)
FGAPI void FGAPIENTRY glutCloseFunc(void(*callback)(void))
FGAPI void FGAPIENTRY glutMultiPassiveFunc(void(*callback)(int, int, int))
FGAPI void FGAPIENTRY glutMultiEntryFunc(void(*callback)(int, int))
float glutJoystickGetDeadBand(int ident, int axis)
FGAPI void FGAPIENTRY glutSetMenuData(void *data)
FGAPI void FGAPIENTRY glutMenuDestroyFunc(void(*callback)(void))
#define FGAPI
Definition: freeglut_std.h:106
#define FGAPIENTRY
Definition: freeglut_std.h:107