| 1 |
#ifndef __FREEGLUT_STD_H__ |
| 2 |
#define __FREEGLUT_STD_H__ |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
#ifdef __cplusplus |
| 32 |
extern "C" { |
| 33 |
#endif |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
#ifdef _WIN32 |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
# ifndef FREEGLUT_LIB_PRAGMAS |
| 50 |
# if ( defined(_MSC_VER) || defined(__WATCOMC__) ) && !defined(_WIN32_WCE) |
| 51 |
# define FREEGLUT_LIB_PRAGMAS 1 |
| 52 |
# else |
| 53 |
# define FREEGLUT_LIB_PRAGMAS 0 |
| 54 |
# endif |
| 55 |
# endif |
| 56 |
|
| 57 |
# ifndef WIN32_LEAN_AND_MEAN |
| 58 |
# define WIN32_LEAN_AND_MEAN 1 |
| 59 |
# endif |
| 60 |
# define NOMINMAX |
| 61 |
# include <windows.h> |
| 62 |
|
| 63 |
|
| 64 |
# ifdef FREEGLUT_STATIC |
| 65 |
|
| 66 |
# define FGAPI |
| 67 |
# define FGAPIENTRY |
| 68 |
|
| 69 |
|
| 70 |
# if FREEGLUT_LIB_PRAGMAS |
| 71 |
# pragma comment (lib, "freeglut_static.lib") |
| 72 |
# endif |
| 73 |
|
| 74 |
|
| 75 |
# else |
| 76 |
|
| 77 |
# define FGAPIENTRY __stdcall |
| 78 |
# if defined(FREEGLUT_EXPORTS) |
| 79 |
# define FGAPI __declspec(dllexport) |
| 80 |
# else |
| 81 |
# define FGAPI __declspec(dllimport) |
| 82 |
|
| 83 |
|
| 84 |
# if FREEGLUT_LIB_PRAGMAS |
| 85 |
# pragma comment (lib, "freeglut.lib") |
| 86 |
# endif |
| 87 |
|
| 88 |
# endif |
| 89 |
|
| 90 |
# endif |
| 91 |
|
| 92 |
|
| 93 |
# if FREEGLUT_LIB_PRAGMAS |
| 94 |
# pragma comment (lib, "glu32.lib") |
| 95 |
# pragma comment (lib, "opengl32.lib") |
| 96 |
# pragma comment (lib, "gdi32.lib") |
| 97 |
# pragma comment (lib, "winmm.lib") |
| 98 |
# pragma comment (lib, "user32.lib") |
| 99 |
# endif |
| 100 |
|
| 101 |
#else |
| 102 |
|
| 103 |
|
| 104 |
# define FGAPI |
| 105 |
# define FGAPIENTRY |
| 106 |
|
| 107 |
#endif |
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
#define FREEGLUT 1 |
| 113 |
#define GLUT_API_VERSION 4 |
| 114 |
#define FREEGLUT_VERSION_2_0 1 |
| 115 |
#define GLUT_XLIB_IMPLEMENTATION 13 |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
#include <GL/gl.h> |
| 121 |
#include <GL/glu.h> |
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
#define GLUT_KEY_F1 0x0001 |
| 127 |
#define GLUT_KEY_F2 0x0002 |
| 128 |
#define GLUT_KEY_F3 0x0003 |
| 129 |
#define GLUT_KEY_F4 0x0004 |
| 130 |
#define GLUT_KEY_F5 0x0005 |
| 131 |
#define GLUT_KEY_F6 0x0006 |
| 132 |
#define GLUT_KEY_F7 0x0007 |
| 133 |
#define GLUT_KEY_F8 0x0008 |
| 134 |
#define GLUT_KEY_F9 0x0009 |
| 135 |
#define GLUT_KEY_F10 0x000A |
| 136 |
#define GLUT_KEY_F11 0x000B |
| 137 |
#define GLUT_KEY_F12 0x000C |
| 138 |
#define GLUT_KEY_LEFT 0x0064 |
| 139 |
#define GLUT_KEY_UP 0x0065 |
| 140 |
#define GLUT_KEY_RIGHT 0x0066 |
| 141 |
#define GLUT_KEY_DOWN 0x0067 |
| 142 |
#define GLUT_KEY_PAGE_UP 0x0068 |
| 143 |
#define GLUT_KEY_PAGE_DOWN 0x0069 |
| 144 |
#define GLUT_KEY_HOME 0x006A |
| 145 |
#define GLUT_KEY_END 0x006B |
| 146 |
#define GLUT_KEY_INSERT 0x006C |
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
#define GLUT_LEFT_BUTTON 0x0000 |
| 152 |
#define GLUT_MIDDLE_BUTTON 0x0001 |
| 153 |
#define GLUT_RIGHT_BUTTON 0x0002 |
| 154 |
#define GLUT_DOWN 0x0000 |
| 155 |
#define GLUT_UP 0x0001 |
| 156 |
#define GLUT_LEFT 0x0000 |
| 157 |
#define GLUT_ENTERED 0x0001 |
| 158 |
|
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
#define GLUT_RGB 0x0000 |
| 163 |
#define GLUT_RGBA 0x0000 |
| 164 |
#define GLUT_INDEX 0x0001 |
| 165 |
#define GLUT_SINGLE 0x0000 |
| 166 |
#define GLUT_DOUBLE 0x0002 |
| 167 |
#define GLUT_ACCUM 0x0004 |
| 168 |
#define GLUT_ALPHA 0x0008 |
| 169 |
#define GLUT_DEPTH 0x0010 |
| 170 |
#define GLUT_STENCIL 0x0020 |
| 171 |
#define GLUT_MULTISAMPLE 0x0080 |
| 172 |
#define GLUT_STEREO 0x0100 |
| 173 |
#define GLUT_LUMINANCE 0x0200 |
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
#define GLUT_MENU_NOT_IN_USE 0x0000 |
| 179 |
#define GLUT_MENU_IN_USE 0x0001 |
| 180 |
#define GLUT_NOT_VISIBLE 0x0000 |
| 181 |
#define GLUT_VISIBLE 0x0001 |
| 182 |
#define GLUT_HIDDEN 0x0000 |
| 183 |
#define GLUT_FULLY_RETAINED 0x0001 |
| 184 |
#define GLUT_PARTIALLY_RETAINED 0x0002 |
| 185 |
#define GLUT_FULLY_COVERED 0x0003 |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
|
| 192 |
#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__) |
| 193 |
# define GLUT_STROKE_ROMAN ((void *)0x0000) |
| 194 |
# define GLUT_STROKE_MONO_ROMAN ((void *)0x0001) |
| 195 |
# define GLUT_BITMAP_9_BY_15 ((void *)0x0002) |
| 196 |
# define GLUT_BITMAP_8_BY_13 ((void *)0x0003) |
| 197 |
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *)0x0004) |
| 198 |
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *)0x0005) |
| 199 |
# define GLUT_BITMAP_HELVETICA_10 ((void *)0x0006) |
| 200 |
# define GLUT_BITMAP_HELVETICA_12 ((void *)0x0007) |
| 201 |
# define GLUT_BITMAP_HELVETICA_18 ((void *)0x0008) |
| 202 |
#else |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
extern void* glutStrokeRoman; |
| 207 |
extern void* glutStrokeMonoRoman; |
| 208 |
extern void* glutBitmap9By15; |
| 209 |
extern void* glutBitmap8By13; |
| 210 |
extern void* glutBitmapTimesRoman10; |
| 211 |
extern void* glutBitmapTimesRoman24; |
| 212 |
extern void* glutBitmapHelvetica10; |
| 213 |
extern void* glutBitmapHelvetica12; |
| 214 |
extern void* glutBitmapHelvetica18; |
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
# define GLUT_STROKE_ROMAN ((void *) &glutStrokeRoman) |
| 220 |
# define GLUT_STROKE_MONO_ROMAN ((void *) &glutStrokeMonoRoman) |
| 221 |
# define GLUT_BITMAP_9_BY_15 ((void *) &glutBitmap9By15) |
| 222 |
# define GLUT_BITMAP_8_BY_13 ((void *) &glutBitmap8By13) |
| 223 |
# define GLUT_BITMAP_TIMES_ROMAN_10 ((void *) &glutBitmapTimesRoman10) |
| 224 |
# define GLUT_BITMAP_TIMES_ROMAN_24 ((void *) &glutBitmapTimesRoman24) |
| 225 |
# define GLUT_BITMAP_HELVETICA_10 ((void *) &glutBitmapHelvetica10) |
| 226 |
# define GLUT_BITMAP_HELVETICA_12 ((void *) &glutBitmapHelvetica12) |
| 227 |
# define GLUT_BITMAP_HELVETICA_18 ((void *) &glutBitmapHelvetica18) |
| 228 |
#endif |
| 229 |
|
| 230 |
|
| 231 |
|
| 232 |
|
| 233 |
#define GLUT_WINDOW_X 0x0064 |
| 234 |
#define GLUT_WINDOW_Y 0x0065 |
| 235 |
#define GLUT_WINDOW_WIDTH 0x0066 |
| 236 |
#define GLUT_WINDOW_HEIGHT 0x0067 |
| 237 |
#define GLUT_WINDOW_BUFFER_SIZE 0x0068 |
| 238 |
#define GLUT_WINDOW_STENCIL_SIZE 0x0069 |
| 239 |
#define GLUT_WINDOW_DEPTH_SIZE 0x006A |
| 240 |
#define GLUT_WINDOW_RED_SIZE 0x006B |
| 241 |
#define GLUT_WINDOW_GREEN_SIZE 0x006C |
| 242 |
#define GLUT_WINDOW_BLUE_SIZE 0x006D |
| 243 |
#define GLUT_WINDOW_ALPHA_SIZE 0x006E |
| 244 |
#define GLUT_WINDOW_ACCUM_RED_SIZE 0x006F |
| 245 |
#define GLUT_WINDOW_ACCUM_GREEN_SIZE 0x0070 |
| 246 |
#define GLUT_WINDOW_ACCUM_BLUE_SIZE 0x0071 |
| 247 |
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE 0x0072 |
| 248 |
#define GLUT_WINDOW_DOUBLEBUFFER 0x0073 |
| 249 |
#define GLUT_WINDOW_RGBA 0x0074 |
| 250 |
#define GLUT_WINDOW_PARENT 0x0075 |
| 251 |
#define GLUT_WINDOW_NUM_CHILDREN 0x0076 |
| 252 |
#define GLUT_WINDOW_COLORMAP_SIZE 0x0077 |
| 253 |
#define GLUT_WINDOW_NUM_SAMPLES 0x0078 |
| 254 |
#define GLUT_WINDOW_STEREO 0x0079 |
| 255 |
#define GLUT_WINDOW_CURSOR 0x007A |
| 256 |
|
| 257 |
#define GLUT_SCREEN_WIDTH 0x00C8 |
| 258 |
#define GLUT_SCREEN_HEIGHT 0x00C9 |
| 259 |
#define GLUT_SCREEN_WIDTH_MM 0x00CA |
| 260 |
#define GLUT_SCREEN_HEIGHT_MM 0x00CB |
| 261 |
#define GLUT_MENU_NUM_ITEMS 0x012C |
| 262 |
#define GLUT_DISPLAY_MODE_POSSIBLE 0x0190 |
| 263 |
#define GLUT_INIT_WINDOW_X 0x01F4 |
| 264 |
#define GLUT_INIT_WINDOW_Y 0x01F5 |
| 265 |
#define GLUT_INIT_WINDOW_WIDTH 0x01F6 |
| 266 |
#define GLUT_INIT_WINDOW_HEIGHT 0x01F7 |
| 267 |
#define GLUT_INIT_DISPLAY_MODE 0x01F8 |
| 268 |
#define GLUT_ELAPSED_TIME 0x02BC |
| 269 |
#define GLUT_WINDOW_FORMAT_ID 0x007B |
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
#define GLUT_HAS_KEYBOARD 0x0258 |
| 275 |
#define GLUT_HAS_MOUSE 0x0259 |
| 276 |
#define GLUT_HAS_SPACEBALL 0x025A |
| 277 |
#define GLUT_HAS_DIAL_AND_BUTTON_BOX 0x025B |
| 278 |
#define GLUT_HAS_TABLET 0x025C |
| 279 |
#define GLUT_NUM_MOUSE_BUTTONS 0x025D |
| 280 |
#define GLUT_NUM_SPACEBALL_BUTTONS 0x025E |
| 281 |
#define GLUT_NUM_BUTTON_BOX_BUTTONS 0x025F |
| 282 |
#define GLUT_NUM_DIALS 0x0260 |
| 283 |
#define GLUT_NUM_TABLET_BUTTONS 0x0261 |
| 284 |
#define GLUT_DEVICE_IGNORE_KEY_REPEAT 0x0262 |
| 285 |
#define GLUT_DEVICE_KEY_REPEAT 0x0263 |
| 286 |
#define GLUT_HAS_JOYSTICK 0x0264 |
| 287 |
#define GLUT_OWNS_JOYSTICK 0x0265 |
| 288 |
#define GLUT_JOYSTICK_BUTTONS 0x0266 |
| 289 |
#define GLUT_JOYSTICK_AXES 0x0267 |
| 290 |
#define GLUT_JOYSTICK_POLL_RATE 0x0268 |
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
#define GLUT_OVERLAY_POSSIBLE 0x0320 |
| 296 |
#define GLUT_LAYER_IN_USE 0x0321 |
| 297 |
#define GLUT_HAS_OVERLAY 0x0322 |
| 298 |
#define GLUT_TRANSPARENT_INDEX 0x0323 |
| 299 |
#define GLUT_NORMAL_DAMAGED 0x0324 |
| 300 |
#define GLUT_OVERLAY_DAMAGED 0x0325 |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
#define GLUT_VIDEO_RESIZE_POSSIBLE 0x0384 |
| 306 |
#define GLUT_VIDEO_RESIZE_IN_USE 0x0385 |
| 307 |
#define GLUT_VIDEO_RESIZE_X_DELTA 0x0386 |
| 308 |
#define GLUT_VIDEO_RESIZE_Y_DELTA 0x0387 |
| 309 |
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA 0x0388 |
| 310 |
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA 0x0389 |
| 311 |
#define GLUT_VIDEO_RESIZE_X 0x038A |
| 312 |
#define GLUT_VIDEO_RESIZE_Y 0x038B |
| 313 |
#define GLUT_VIDEO_RESIZE_WIDTH 0x038C |
| 314 |
#define GLUT_VIDEO_RESIZE_HEIGHT 0x038D |
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
#define GLUT_NORMAL 0x0000 |
| 320 |
#define GLUT_OVERLAY 0x0001 |
| 321 |
|
| 322 |
|
| 323 |
|
| 324 |
|
| 325 |
#define GLUT_ACTIVE_SHIFT 0x0001 |
| 326 |
#define GLUT_ACTIVE_CTRL 0x0002 |
| 327 |
#define GLUT_ACTIVE_ALT 0x0004 |
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
#define GLUT_CURSOR_RIGHT_ARROW 0x0000 |
| 333 |
#define GLUT_CURSOR_LEFT_ARROW 0x0001 |
| 334 |
#define GLUT_CURSOR_INFO 0x0002 |
| 335 |
#define GLUT_CURSOR_DESTROY 0x0003 |
| 336 |
#define GLUT_CURSOR_HELP 0x0004 |
| 337 |
#define GLUT_CURSOR_CYCLE 0x0005 |
| 338 |
#define GLUT_CURSOR_SPRAY 0x0006 |
| 339 |
#define GLUT_CURSOR_WAIT 0x0007 |
| 340 |
#define GLUT_CURSOR_TEXT 0x0008 |
| 341 |
#define GLUT_CURSOR_CROSSHAIR 0x0009 |
| 342 |
#define GLUT_CURSOR_UP_DOWN 0x000A |
| 343 |
#define GLUT_CURSOR_LEFT_RIGHT 0x000B |
| 344 |
#define GLUT_CURSOR_TOP_SIDE 0x000C |
| 345 |
#define GLUT_CURSOR_BOTTOM_SIDE 0x000D |
| 346 |
#define GLUT_CURSOR_LEFT_SIDE 0x000E |
| 347 |
#define GLUT_CURSOR_RIGHT_SIDE 0x000F |
| 348 |
#define GLUT_CURSOR_TOP_LEFT_CORNER 0x0010 |
| 349 |
#define GLUT_CURSOR_TOP_RIGHT_CORNER 0x0011 |
| 350 |
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 0x0012 |
| 351 |
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 0x0013 |
| 352 |
#define GLUT_CURSOR_INHERIT 0x0064 |
| 353 |
#define GLUT_CURSOR_NONE 0x0065 |
| 354 |
#define GLUT_CURSOR_FULL_CROSSHAIR 0x0066 |
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
#define GLUT_RED 0x0000 |
| 360 |
#define GLUT_GREEN 0x0001 |
| 361 |
#define GLUT_BLUE 0x0002 |
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
|
| 366 |
#define GLUT_KEY_REPEAT_OFF 0x0000 |
| 367 |
#define GLUT_KEY_REPEAT_ON 0x0001 |
| 368 |
#define GLUT_KEY_REPEAT_DEFAULT 0x0002 |
| 369 |
|
| 370 |
#define GLUT_JOYSTICK_BUTTON_A 0x0001 |
| 371 |
#define GLUT_JOYSTICK_BUTTON_B 0x0002 |
| 372 |
#define GLUT_JOYSTICK_BUTTON_C 0x0004 |
| 373 |
#define GLUT_JOYSTICK_BUTTON_D 0x0008 |
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
|
| 378 |
#define GLUT_GAME_MODE_ACTIVE 0x0000 |
| 379 |
#define GLUT_GAME_MODE_POSSIBLE 0x0001 |
| 380 |
#define GLUT_GAME_MODE_WIDTH 0x0002 |
| 381 |
#define GLUT_GAME_MODE_HEIGHT 0x0003 |
| 382 |
#define GLUT_GAME_MODE_PIXEL_DEPTH 0x0004 |
| 383 |
#define GLUT_GAME_MODE_REFRESH_RATE 0x0005 |
| 384 |
#define GLUT_GAME_MODE_DISPLAY_CHANGED 0x0006 |
| 385 |
|
| 386 |
|
| 387 |
|
| 388 |
|
| 389 |
FGAPI void FGAPIENTRY glutInit( int* pargc, char** argv ); |
| 390 |
FGAPI void FGAPIENTRY glutInitWindowPosition( int x, int y ); |
| 391 |
FGAPI void FGAPIENTRY glutInitWindowSize( int width, int height ); |
| 392 |
FGAPI void FGAPIENTRY glutInitDisplayMode( unsigned int displayMode ); |
| 393 |
FGAPI void FGAPIENTRY glutInitDisplayString( const char* displayMode ); |
| 394 |
|
| 395 |
|
| 396 |
|
| 397 |
|
| 398 |
FGAPI void FGAPIENTRY glutMainLoop( void ); |
| 399 |
|
| 400 |
|
| 401 |
|
| 402 |
|
| 403 |
FGAPI int FGAPIENTRY glutCreateWindow( const char* title ); |
| 404 |
FGAPI int FGAPIENTRY glutCreateSubWindow( int window, int x, int y, int width, int height ); |
| 405 |
FGAPI void FGAPIENTRY glutDestroyWindow( int window ); |
| 406 |
FGAPI void FGAPIENTRY glutSetWindow( int window ); |
| 407 |
FGAPI int FGAPIENTRY glutGetWindow( void ); |
| 408 |
FGAPI void FGAPIENTRY glutSetWindowTitle( const char* title ); |
| 409 |
FGAPI void FGAPIENTRY glutSetIconTitle( const char* title ); |
| 410 |
FGAPI void FGAPIENTRY glutReshapeWindow( int width, int height ); |
| 411 |
FGAPI void FGAPIENTRY glutPositionWindow( int x, int y ); |
| 412 |
FGAPI void FGAPIENTRY glutShowWindow( void ); |
| 413 |
FGAPI void FGAPIENTRY glutHideWindow( void ); |
| 414 |
FGAPI void FGAPIENTRY glutIconifyWindow( void ); |
| 415 |
FGAPI void FGAPIENTRY glutPushWindow( void ); |
| 416 |
FGAPI void FGAPIENTRY glutPopWindow( void ); |
| 417 |
FGAPI void FGAPIENTRY glutFullScreen( void ); |
| 418 |
|
| 419 |
|
| 420 |
|
| 421 |
|
| 422 |
FGAPI void FGAPIENTRY glutPostWindowRedisplay( int window ); |
| 423 |
FGAPI void FGAPIENTRY glutPostRedisplay( void ); |
| 424 |
FGAPI void FGAPIENTRY glutSwapBuffers( void ); |
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
FGAPI void FGAPIENTRY glutWarpPointer( int x, int y ); |
| 430 |
FGAPI void FGAPIENTRY glutSetCursor( int cursor ); |
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
FGAPI void FGAPIENTRY glutEstablishOverlay( void ); |
| 436 |
FGAPI void FGAPIENTRY glutRemoveOverlay( void ); |
| 437 |
FGAPI void FGAPIENTRY glutUseLayer( GLenum layer ); |
| 438 |
FGAPI void FGAPIENTRY glutPostOverlayRedisplay( void ); |
| 439 |
FGAPI void FGAPIENTRY glutPostWindowOverlayRedisplay( int window ); |
| 440 |
FGAPI void FGAPIENTRY glutShowOverlay( void ); |
| 441 |
FGAPI void FGAPIENTRY glutHideOverlay( void ); |
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
FGAPI int FGAPIENTRY glutCreateMenu( void (* callback)( int menu ) ); |
| 447 |
FGAPI void FGAPIENTRY glutDestroyMenu( int menu ); |
| 448 |
FGAPI int FGAPIENTRY glutGetMenu( void ); |
| 449 |
FGAPI void FGAPIENTRY glutSetMenu( int menu ); |
| 450 |
FGAPI void FGAPIENTRY glutAddMenuEntry( const char* label, int value ); |
| 451 |
FGAPI void FGAPIENTRY glutAddSubMenu( const char* label, int subMenu ); |
| 452 |
FGAPI void FGAPIENTRY glutChangeToMenuEntry( int item, const char* label, int value ); |
| 453 |
FGAPI void FGAPIENTRY glutChangeToSubMenu( int item, const char* label, int value ); |
| 454 |
FGAPI void FGAPIENTRY glutRemoveMenuItem( int item ); |
| 455 |
FGAPI void FGAPIENTRY glutAttachMenu( int button ); |
| 456 |
FGAPI void FGAPIENTRY glutDetachMenu( int button ); |
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
FGAPI void FGAPIENTRY glutTimerFunc( unsigned int time, void (* callback)( int ), int value ); |
| 462 |
FGAPI void FGAPIENTRY glutIdleFunc( void (* callback)( void ) ); |
| 463 |
|
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
FGAPI void FGAPIENTRY glutKeyboardFunc( void (* callback)( unsigned char, int, int ) ); |
| 468 |
FGAPI void FGAPIENTRY glutSpecialFunc( void (* callback)( int, int, int ) ); |
| 469 |
FGAPI void FGAPIENTRY glutReshapeFunc( void (* callback)( int, int ) ); |
| 470 |
FGAPI void FGAPIENTRY glutVisibilityFunc( void (* callback)( int ) ); |
| 471 |
FGAPI void FGAPIENTRY glutDisplayFunc( void (* callback)( void ) ); |
| 472 |
FGAPI void FGAPIENTRY glutMouseFunc( void (* callback)( int, int, int, int ) ); |
| 473 |
FGAPI void FGAPIENTRY glutMotionFunc( void (* callback)( int, int ) ); |
| 474 |
FGAPI void FGAPIENTRY glutPassiveMotionFunc( void (* callback)( int, int ) ); |
| 475 |
FGAPI void FGAPIENTRY glutEntryFunc( void (* callback)( int ) ); |
| 476 |
|
| 477 |
FGAPI void FGAPIENTRY glutKeyboardUpFunc( void (* callback)( unsigned char, int, int ) ); |
| 478 |
FGAPI void FGAPIENTRY glutSpecialUpFunc( void (* callback)( int, int, int ) ); |
| 479 |
FGAPI void FGAPIENTRY glutJoystickFunc( void (* callback)( unsigned int, int, int, int ), int pollInterval ); |
| 480 |
FGAPI void FGAPIENTRY glutMenuStateFunc( void (* callback)( int ) ); |
| 481 |
FGAPI void FGAPIENTRY glutMenuStatusFunc( void (* callback)( int, int, int ) ); |
| 482 |
FGAPI void FGAPIENTRY glutOverlayDisplayFunc( void (* callback)( void ) ); |
| 483 |
FGAPI void FGAPIENTRY glutWindowStatusFunc( void (* callback)( int ) ); |
| 484 |
|
| 485 |
FGAPI void FGAPIENTRY glutSpaceballMotionFunc( void (* callback)( int, int, int ) ); |
| 486 |
FGAPI void FGAPIENTRY glutSpaceballRotateFunc( void (* callback)( int, int, int ) ); |
| 487 |
FGAPI void FGAPIENTRY glutSpaceballButtonFunc( void (* callback)( int, int ) ); |
| 488 |
FGAPI void FGAPIENTRY glutButtonBoxFunc( void (* callback)( int, int ) ); |
| 489 |
FGAPI void FGAPIENTRY glutDialsFunc( void (* callback)( int, int ) ); |
| 490 |
FGAPI void FGAPIENTRY glutTabletMotionFunc( void (* callback)( int, int ) ); |
| 491 |
FGAPI void FGAPIENTRY glutTabletButtonFunc( void (* callback)( int, int, int, int ) ); |
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
FGAPI int FGAPIENTRY glutGet( GLenum query ); |
| 497 |
FGAPI int FGAPIENTRY glutDeviceGet( GLenum query ); |
| 498 |
FGAPI int FGAPIENTRY glutGetModifiers( void ); |
| 499 |
FGAPI int FGAPIENTRY glutLayerGet( GLenum query ); |
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
FGAPI void FGAPIENTRY glutBitmapCharacter( void* font, int character ); |
| 505 |
FGAPI int FGAPIENTRY glutBitmapWidth( void* font, int character ); |
| 506 |
FGAPI void FGAPIENTRY glutStrokeCharacter( void* font, int character ); |
| 507 |
FGAPI int FGAPIENTRY glutStrokeWidth( void* font, int character ); |
| 508 |
FGAPI int FGAPIENTRY glutBitmapLength( void* font, const unsigned char* string ); |
| 509 |
FGAPI int FGAPIENTRY glutStrokeLength( void* font, const unsigned char* string ); |
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
FGAPI void FGAPIENTRY glutWireCube( GLdouble size ); |
| 515 |
FGAPI void FGAPIENTRY glutSolidCube( GLdouble size ); |
| 516 |
FGAPI void FGAPIENTRY glutWireSphere( GLdouble radius, GLint slices, GLint stacks ); |
| 517 |
FGAPI void FGAPIENTRY glutSolidSphere( GLdouble radius, GLint slices, GLint stacks ); |
| 518 |
FGAPI void FGAPIENTRY glutWireCone( GLdouble base, GLdouble height, GLint slices, GLint stacks ); |
| 519 |
FGAPI void FGAPIENTRY glutSolidCone( GLdouble base, GLdouble height, GLint slices, GLint stacks ); |
| 520 |
|
| 521 |
FGAPI void FGAPIENTRY glutWireTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings ); |
| 522 |
FGAPI void FGAPIENTRY glutSolidTorus( GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings ); |
| 523 |
FGAPI void FGAPIENTRY glutWireDodecahedron( void ); |
| 524 |
FGAPI void FGAPIENTRY glutSolidDodecahedron( void ); |
| 525 |
FGAPI void FGAPIENTRY glutWireOctahedron( void ); |
| 526 |
FGAPI void FGAPIENTRY glutSolidOctahedron( void ); |
| 527 |
FGAPI void FGAPIENTRY glutWireTetrahedron( void ); |
| 528 |
FGAPI void FGAPIENTRY glutSolidTetrahedron( void ); |
| 529 |
FGAPI void FGAPIENTRY glutWireIcosahedron( void ); |
| 530 |
FGAPI void FGAPIENTRY glutSolidIcosahedron( void ); |
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
FGAPI void FGAPIENTRY glutWireTeapot( GLdouble size ); |
| 536 |
FGAPI void FGAPIENTRY glutSolidTeapot( GLdouble size ); |
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
FGAPI void FGAPIENTRY glutGameModeString( const char* string ); |
| 542 |
FGAPI int FGAPIENTRY glutEnterGameMode( void ); |
| 543 |
FGAPI void FGAPIENTRY glutLeaveGameMode( void ); |
| 544 |
FGAPI int FGAPIENTRY glutGameModeGet( GLenum query ); |
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
FGAPI int FGAPIENTRY glutVideoResizeGet( GLenum query ); |
| 550 |
FGAPI void FGAPIENTRY glutSetupVideoResizing( void ); |
| 551 |
FGAPI void FGAPIENTRY glutStopVideoResizing( void ); |
| 552 |
FGAPI void FGAPIENTRY glutVideoResize( int x, int y, int width, int height ); |
| 553 |
FGAPI void FGAPIENTRY glutVideoPan( int x, int y, int width, int height ); |
| 554 |
|
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
FGAPI void FGAPIENTRY glutSetColor( int color, GLfloat red, GLfloat green, GLfloat blue ); |
| 559 |
FGAPI GLfloat FGAPIENTRY glutGetColor( int color, int component ); |
| 560 |
FGAPI void FGAPIENTRY glutCopyColormap( int window ); |
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
FGAPI void FGAPIENTRY glutIgnoreKeyRepeat( int ignore ); |
| 566 |
FGAPI void FGAPIENTRY glutSetKeyRepeat( int repeatMode ); |
| 567 |
FGAPI void FGAPIENTRY glutForceJoystickFunc( void ); |
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
FGAPI int FGAPIENTRY glutExtensionSupported( const char* extension ); |
| 573 |
FGAPI void FGAPIENTRY glutReportErrors( void ); |
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
|
| 578 |
|
| 579 |
|
| 580 |
|
| 581 |
|
| 582 |
|
| 583 |
|
| 584 |
|
| 585 |
|
| 586 |
|
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
#include <stdlib.h> |
| 599 |
|
| 600 |
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK) && !defined(__WATCOMC__) |
| 601 |
FGAPI void FGAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int)); |
| 602 |
FGAPI int FGAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int)); |
| 603 |
FGAPI int FGAPIENTRY __glutCreateMenuWithExit(void (* func)(int), void (__cdecl *exitfunc)(int)); |
| 604 |
#ifndef FREEGLUT_BUILDING_LIB |
| 605 |
#if defined(__GNUC__) |
| 606 |
#define FGUNUSED __attribute__((unused)) |
| 607 |
#else |
| 608 |
#define FGUNUSED |
| 609 |
#endif |
| 610 |
static void FGAPIENTRY FGUNUSED glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); } |
| 611 |
#define glutInit glutInit_ATEXIT_HACK |
| 612 |
static int FGAPIENTRY FGUNUSED glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); } |
| 613 |
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK |
| 614 |
static int FGAPIENTRY FGUNUSED glutCreateMenu_ATEXIT_HACK(void (* func)(int)) { return __glutCreateMenuWithExit(func, exit); } |
| 615 |
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK |
| 616 |
#endif |
| 617 |
#endif |
| 618 |
|
| 619 |
#ifdef __cplusplus |
| 620 |
} |
| 621 |
#endif |
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
#endif |
| 626 |
|