glut.h
Go to the documentation of this file.
00001 #ifndef __glut_h__
00002 #define __glut_h__
00003 
00004 /* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
00005 
00006 /* This program is freely distributable without licensing fees  and is
00007    provided without guarantee or warrantee expressed or  implied. This
00008    program is -not- in the public domain. */
00009 
00010 #if defined(_WIN32)
00011 
00012 /* GLUT 3.7 now tries to avoid including <windows.h>
00013    to avoid name space pollution, but Win32's <GL/gl.h> 
00014    needs APIENTRY and WINGDIAPI defined properly. */
00015 # if 0
00016 #  define  WIN32_LEAN_AND_MEAN
00017 #  include <windows.h>
00018 # else
00019    /* XXX This is from Win32's <windef.h> */
00020 #  ifndef APIENTRY
00021 #   define GLUT_APIENTRY_DEFINED
00022 #   if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
00023 #    define APIENTRY    __stdcall
00024 #   else
00025 #    define APIENTRY
00026 #   endif
00027 #  endif
00028    /* XXX This is from Win32's <winnt.h> */
00029 #  ifndef CALLBACK
00030 #   if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC)) && !defined(MIDL_PASS)
00031 #    define CALLBACK __stdcall
00032 #   else
00033 #    define CALLBACK
00034 #   endif
00035 #  endif
00036    /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
00037 #  ifndef WINGDIAPI
00038 #   define GLUT_WINGDIAPI_DEFINED
00039 #   define WINGDIAPI __declspec(dllimport)
00040 #  endif
00041    /* XXX This is from Win32's <ctype.h> */
00042 #  ifndef _WCHAR_T_DEFINED
00043 typedef unsigned short wchar_t;
00044 #   define _WCHAR_T_DEFINED
00045 #  endif
00046 # endif
00047 
00048 #pragma comment (lib, "winmm.lib")     /* link with Windows MultiMedia lib */
00049 #pragma comment (lib, "opengl32.lib")  /* link with Microsoft OpenGL lib */
00050 #pragma comment (lib, "glu32.lib")     /* link with OpenGL Utility lib */
00051 #pragma comment (lib, "glut32.lib")    /* link with Win32 GLUT lib */
00052 
00053 #pragma warning (disable:4244)  /* Disable bogus conversion warnings. */
00054 #pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */
00055 
00056 #endif
00057 
00058 #include <GL/gl.h>
00059 #include <GL/glu.h>
00060 
00061 /* define APIENTRY and CALLBACK to null string if we aren't on Win32 */
00062 #if !defined(_WIN32)
00063 #define APIENTRY
00064 #define GLUT_APIENTRY_DEFINED
00065 #define CALLBACK
00066 #endif
00067 
00068 #ifdef __cplusplus
00069 extern "C" {
00070 #endif
00071 
00093 #ifndef GLUT_API_VERSION  /* allow this to be overriden */
00094 #define GLUT_API_VERSION                3
00095 #endif
00096 
00129 #ifndef GLUT_XLIB_IMPLEMENTATION  /* Allow this to be overriden. */
00130 #define GLUT_XLIB_IMPLEMENTATION        13
00131 #endif
00132 
00133 /* Display mode bit masks. */
00134 #define GLUT_RGB                        0
00135 #define GLUT_RGBA                       GLUT_RGB
00136 #define GLUT_INDEX                      1
00137 #define GLUT_SINGLE                     0
00138 #define GLUT_DOUBLE                     2
00139 #define GLUT_ACCUM                      4
00140 #define GLUT_ALPHA                      8
00141 #define GLUT_DEPTH                      16
00142 #define GLUT_STENCIL                    32
00143 #if (GLUT_API_VERSION >= 2)
00144 #define GLUT_MULTISAMPLE                128
00145 #define GLUT_STEREO                     256
00146 #endif
00147 #if (GLUT_API_VERSION >= 3)
00148 #define GLUT_LUMINANCE                  512
00149 #endif
00150 
00151 /* Mouse buttons. */
00152 #define GLUT_LEFT_BUTTON                0
00153 #define GLUT_MIDDLE_BUTTON              1
00154 #define GLUT_RIGHT_BUTTON               2
00155 
00156 /* Mouse button  state. */
00157 #define GLUT_DOWN                       0
00158 #define GLUT_UP                         1
00159 
00160 #if (GLUT_API_VERSION >= 2)
00161 /* function keys */
00162 #define GLUT_KEY_F1                     1
00163 #define GLUT_KEY_F2                     2
00164 #define GLUT_KEY_F3                     3
00165 #define GLUT_KEY_F4                     4
00166 #define GLUT_KEY_F5                     5
00167 #define GLUT_KEY_F6                     6
00168 #define GLUT_KEY_F7                     7
00169 #define GLUT_KEY_F8                     8
00170 #define GLUT_KEY_F9                     9
00171 #define GLUT_KEY_F10                    10
00172 #define GLUT_KEY_F11                    11
00173 #define GLUT_KEY_F12                    12
00174 /* directional keys */
00175 #define GLUT_KEY_LEFT                   100
00176 #define GLUT_KEY_UP                     101
00177 #define GLUT_KEY_RIGHT                  102
00178 #define GLUT_KEY_DOWN                   103
00179 #define GLUT_KEY_PAGE_UP                104
00180 #define GLUT_KEY_PAGE_DOWN              105
00181 #define GLUT_KEY_HOME                   106
00182 #define GLUT_KEY_END                    107
00183 #define GLUT_KEY_INSERT                 108
00184 #endif
00185 
00186 /* Entry/exit  state. */
00187 #define GLUT_LEFT                       0
00188 #define GLUT_ENTERED                    1
00189 
00190 /* Menu usage  state. */
00191 #define GLUT_MENU_NOT_IN_USE            0
00192 #define GLUT_MENU_IN_USE                1
00193 
00194 /* Visibility  state. */
00195 #define GLUT_NOT_VISIBLE                0
00196 #define GLUT_VISIBLE                    1
00197 
00198 /* Window status  state. */
00199 #define GLUT_HIDDEN                     0
00200 #define GLUT_FULLY_RETAINED             1
00201 #define GLUT_PARTIALLY_RETAINED         2
00202 #define GLUT_FULLY_COVERED              3
00203 
00204 /* Color index component selection values. */
00205 #define GLUT_RED                        0
00206 #define GLUT_GREEN                      1
00207 #define GLUT_BLUE                       2
00208 
00209 /* Layers for use. */
00210 #define GLUT_NORMAL                     0
00211 #define GLUT_OVERLAY                    1
00212 
00213 #if defined(_WIN32)
00214 /* Stroke font constants (use these in GLUT program). */
00215 #define GLUT_STROKE_ROMAN               ((void*)0)
00216 #define GLUT_STROKE_MONO_ROMAN          ((void*)1)
00217 
00218 /* Bitmap font constants (use these in GLUT program). */
00219 #define GLUT_BITMAP_9_BY_15             ((void*)2)
00220 #define GLUT_BITMAP_8_BY_13             ((void*)3)
00221 #define GLUT_BITMAP_TIMES_ROMAN_10      ((void*)4)
00222 #define GLUT_BITMAP_TIMES_ROMAN_24      ((void*)5)
00223 #if (GLUT_API_VERSION >= 3)
00224 #define GLUT_BITMAP_HELVETICA_10        ((void*)6)
00225 #define GLUT_BITMAP_HELVETICA_12        ((void*)7)
00226 #define GLUT_BITMAP_HELVETICA_18        ((void*)8)
00227 #endif
00228 #else
00229 /* Stroke font opaque addresses (use constants instead in source code). */
00230 extern void *glutStrokeRoman;
00231 extern void *glutStrokeMonoRoman;
00232 
00233 /* Stroke font constants (use these in GLUT program). */
00234 #define GLUT_STROKE_ROMAN               (&glutStrokeRoman)
00235 #define GLUT_STROKE_MONO_ROMAN          (&glutStrokeMonoRoman)
00236 
00237 /* Bitmap font opaque addresses (use constants instead in source code). */
00238 extern void *glutBitmap9By15;
00239 extern void *glutBitmap8By13;
00240 extern void *glutBitmapTimesRoman10;
00241 extern void *glutBitmapTimesRoman24;
00242 extern void *glutBitmapHelvetica10;
00243 extern void *glutBitmapHelvetica12;
00244 extern void *glutBitmapHelvetica18;
00245 
00246 /* Bitmap font constants (use these in GLUT program). */
00247 #define GLUT_BITMAP_9_BY_15             (&glutBitmap9By15)
00248 #define GLUT_BITMAP_8_BY_13             (&glutBitmap8By13)
00249 #define GLUT_BITMAP_TIMES_ROMAN_10      (&glutBitmapTimesRoman10)
00250 #define GLUT_BITMAP_TIMES_ROMAN_24      (&glutBitmapTimesRoman24)
00251 #if (GLUT_API_VERSION >= 3)
00252 #define GLUT_BITMAP_HELVETICA_10        (&glutBitmapHelvetica10)
00253 #define GLUT_BITMAP_HELVETICA_12        (&glutBitmapHelvetica12)
00254 #define GLUT_BITMAP_HELVETICA_18        (&glutBitmapHelvetica18)
00255 #endif
00256 #endif
00257 
00258 /* glutGet parameters. */
00259 #define GLUT_WINDOW_X                   100
00260 #define GLUT_WINDOW_Y                   101
00261 #define GLUT_WINDOW_WIDTH               102
00262 #define GLUT_WINDOW_HEIGHT              103
00263 #define GLUT_WINDOW_BUFFER_SIZE         104
00264 #define GLUT_WINDOW_STENCIL_SIZE        105
00265 #define GLUT_WINDOW_DEPTH_SIZE          106
00266 #define GLUT_WINDOW_RED_SIZE            107
00267 #define GLUT_WINDOW_GREEN_SIZE          108
00268 #define GLUT_WINDOW_BLUE_SIZE           109
00269 #define GLUT_WINDOW_ALPHA_SIZE          110
00270 #define GLUT_WINDOW_ACCUM_RED_SIZE      111
00271 #define GLUT_WINDOW_ACCUM_GREEN_SIZE    112
00272 #define GLUT_WINDOW_ACCUM_BLUE_SIZE     113
00273 #define GLUT_WINDOW_ACCUM_ALPHA_SIZE    114
00274 #define GLUT_WINDOW_DOUBLEBUFFER        115
00275 #define GLUT_WINDOW_RGBA                116
00276 #define GLUT_WINDOW_PARENT              117
00277 #define GLUT_WINDOW_NUM_CHILDREN        118
00278 #define GLUT_WINDOW_COLORMAP_SIZE       119
00279 #if (GLUT_API_VERSION >= 2)
00280 #define GLUT_WINDOW_NUM_SAMPLES         120
00281 #define GLUT_WINDOW_STEREO              121
00282 #endif
00283 #if (GLUT_API_VERSION >= 3)
00284 #define GLUT_WINDOW_CURSOR              122
00285 #endif
00286 #define GLUT_SCREEN_WIDTH               200
00287 #define GLUT_SCREEN_HEIGHT              201
00288 #define GLUT_SCREEN_WIDTH_MM            202
00289 #define GLUT_SCREEN_HEIGHT_MM           203
00290 #define GLUT_MENU_NUM_ITEMS             300
00291 #define GLUT_DISPLAY_MODE_POSSIBLE      400
00292 #define GLUT_INIT_WINDOW_X              500
00293 #define GLUT_INIT_WINDOW_Y              501
00294 #define GLUT_INIT_WINDOW_WIDTH          502
00295 #define GLUT_INIT_WINDOW_HEIGHT         503
00296 #define GLUT_INIT_DISPLAY_MODE          504
00297 #if (GLUT_API_VERSION >= 2)
00298 #define GLUT_ELAPSED_TIME               700
00299 #endif
00300 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00301 #define GLUT_WINDOW_FORMAT_ID           123
00302 #endif
00303 
00304 #if (GLUT_API_VERSION >= 2)
00305 /* glutDeviceGet parameters. */
00306 #define GLUT_HAS_KEYBOARD               600
00307 #define GLUT_HAS_MOUSE                  601
00308 #define GLUT_HAS_SPACEBALL              602
00309 #define GLUT_HAS_DIAL_AND_BUTTON_BOX    603
00310 #define GLUT_HAS_TABLET                 604
00311 #define GLUT_NUM_MOUSE_BUTTONS          605
00312 #define GLUT_NUM_SPACEBALL_BUTTONS      606
00313 #define GLUT_NUM_BUTTON_BOX_BUTTONS     607
00314 #define GLUT_NUM_DIALS                  608
00315 #define GLUT_NUM_TABLET_BUTTONS         609
00316 #endif
00317 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00318 #define GLUT_DEVICE_IGNORE_KEY_REPEAT   610
00319 #define GLUT_DEVICE_KEY_REPEAT          611
00320 #define GLUT_HAS_JOYSTICK               612
00321 #define GLUT_OWNS_JOYSTICK              613
00322 #define GLUT_JOYSTICK_BUTTONS           614
00323 #define GLUT_JOYSTICK_AXES              615
00324 #define GLUT_JOYSTICK_POLL_RATE         616
00325 #endif
00326 
00327 #if (GLUT_API_VERSION >= 3)
00328 /* glutLayerGet parameters. */
00329 #define GLUT_OVERLAY_POSSIBLE           800
00330 #define GLUT_LAYER_IN_USE               801
00331 #define GLUT_HAS_OVERLAY                802
00332 #define GLUT_TRANSPARENT_INDEX          803
00333 #define GLUT_NORMAL_DAMAGED             804
00334 #define GLUT_OVERLAY_DAMAGED            805
00335 
00336 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00337 /* glutVideoResizeGet parameters. */
00338 #define GLUT_VIDEO_RESIZE_POSSIBLE      900
00339 #define GLUT_VIDEO_RESIZE_IN_USE        901
00340 #define GLUT_VIDEO_RESIZE_X_DELTA       902
00341 #define GLUT_VIDEO_RESIZE_Y_DELTA       903
00342 #define GLUT_VIDEO_RESIZE_WIDTH_DELTA   904
00343 #define GLUT_VIDEO_RESIZE_HEIGHT_DELTA  905
00344 #define GLUT_VIDEO_RESIZE_X             906
00345 #define GLUT_VIDEO_RESIZE_Y             907
00346 #define GLUT_VIDEO_RESIZE_WIDTH         908
00347 #define GLUT_VIDEO_RESIZE_HEIGHT        909
00348 #endif
00349 
00350 /* glutUseLayer parameters. */
00351 #define GLUT_NORMAL                     0
00352 #define GLUT_OVERLAY                    1
00353 
00354 /* glutGetModifiers return mask. */
00355 #define GLUT_ACTIVE_SHIFT               1
00356 #define GLUT_ACTIVE_CTRL                2
00357 #define GLUT_ACTIVE_ALT                 4
00358 
00359 /* glutSetCursor parameters. */
00360 /* Basic arrows. */
00361 #define GLUT_CURSOR_RIGHT_ARROW         0
00362 #define GLUT_CURSOR_LEFT_ARROW          1
00363 /* Symbolic cursor shapes. */
00364 #define GLUT_CURSOR_INFO                2
00365 #define GLUT_CURSOR_DESTROY             3
00366 #define GLUT_CURSOR_HELP                4
00367 #define GLUT_CURSOR_CYCLE               5
00368 #define GLUT_CURSOR_SPRAY               6
00369 #define GLUT_CURSOR_WAIT                7
00370 #define GLUT_CURSOR_TEXT                8
00371 #define GLUT_CURSOR_CROSSHAIR           9
00372 /* Directional cursors. */
00373 #define GLUT_CURSOR_UP_DOWN             10
00374 #define GLUT_CURSOR_LEFT_RIGHT          11
00375 /* Sizing cursors. */
00376 #define GLUT_CURSOR_TOP_SIDE            12
00377 #define GLUT_CURSOR_BOTTOM_SIDE         13
00378 #define GLUT_CURSOR_LEFT_SIDE           14
00379 #define GLUT_CURSOR_RIGHT_SIDE          15
00380 #define GLUT_CURSOR_TOP_LEFT_CORNER     16
00381 #define GLUT_CURSOR_TOP_RIGHT_CORNER    17
00382 #define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
00383 #define GLUT_CURSOR_BOTTOM_LEFT_CORNER  19
00384 /* Inherit from parent window. */
00385 #define GLUT_CURSOR_INHERIT             100
00386 /* Blank cursor. */
00387 #define GLUT_CURSOR_NONE                101
00388 /* Fullscreen crosshair (if available). */
00389 #define GLUT_CURSOR_FULL_CROSSHAIR      102
00390 #endif
00391 
00392 /* GLUT initialization sub-API. */
00393 extern void APIENTRY glutInit(int *argcp, char **argv);
00394 extern void APIENTRY glutInitDisplayMode(unsigned int mode);
00395 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00396 extern void APIENTRY glutInitDisplayString(const char *string);
00397 #endif
00398 extern void APIENTRY glutInitWindowPosition(int x, int y);
00399 extern void APIENTRY glutInitWindowSize(int width, int height);
00400 extern void APIENTRY glutMainLoop(void);
00401 
00402 /* GLUT window sub-API. */
00403 extern int APIENTRY glutCreateWindow(const char *title);
00404 extern int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
00405 extern void APIENTRY glutDestroyWindow(int win);
00406 extern void APIENTRY glutPostRedisplay(void);
00407 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
00408 extern void APIENTRY glutPostWindowRedisplay(int win);
00409 #endif
00410 extern void APIENTRY glutSwapBuffers(void);
00411 extern int APIENTRY glutGetWindow(void);
00412 extern void APIENTRY glutSetWindow(int win);
00413 extern void APIENTRY glutSetWindowTitle(const char *title);
00414 extern void APIENTRY glutSetIconTitle(const char *title);
00415 extern void APIENTRY glutPositionWindow(int x, int y);
00416 extern void APIENTRY glutReshapeWindow(int width, int height);
00417 extern void APIENTRY glutPopWindow(void);
00418 extern void APIENTRY glutPushWindow(void);
00419 extern void APIENTRY glutIconifyWindow(void);
00420 extern void APIENTRY glutShowWindow(void);
00421 extern void APIENTRY glutHideWindow(void);
00422 #if (GLUT_API_VERSION >= 3)
00423 extern void APIENTRY glutFullScreen(void);
00424 extern void APIENTRY glutSetCursor(int cursor);
00425 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00426 extern void APIENTRY glutWarpPointer(int x, int y);
00427 #endif
00428 
00429 /* GLUT overlay sub-API. */
00430 extern void APIENTRY glutEstablishOverlay(void);
00431 extern void APIENTRY glutRemoveOverlay(void);
00432 extern void APIENTRY glutUseLayer(GLenum layer);
00433 extern void APIENTRY glutPostOverlayRedisplay(void);
00434 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
00435 extern void APIENTRY glutPostWindowOverlayRedisplay(int win);
00436 #endif
00437 extern void APIENTRY glutShowOverlay(void);
00438 extern void APIENTRY glutHideOverlay(void);
00439 #endif
00440 
00441 /* GLUT menu sub-API. */
00442 extern int APIENTRY glutCreateMenu(void (*)(int));
00443 extern void APIENTRY glutDestroyMenu(int menu);
00444 extern int APIENTRY glutGetMenu(void);
00445 extern void APIENTRY glutSetMenu(int menu);
00446 extern void APIENTRY glutAddMenuEntry(const char *label, int value);
00447 extern void APIENTRY glutAddSubMenu(const char *label, int submenu);
00448 extern void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
00449 extern void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
00450 extern void APIENTRY glutRemoveMenuItem(int item);
00451 extern void APIENTRY glutAttachMenu(int button);
00452 extern void APIENTRY glutDetachMenu(int button);
00453 
00454 /* GLUT window callback sub-API. */
00455 extern void APIENTRY glutDisplayFunc(void (*func)(void));
00456 extern void APIENTRY glutReshapeFunc(void (*func)(int width, int height));
00457 extern void APIENTRY glutKeyboardFunc(void (*func)(unsigned char key, int x, int y));
00458 extern void APIENTRY glutMouseFunc(void (*func)(int button, int state, int x, int y));
00459 extern void APIENTRY glutMotionFunc(void (*func)(int x, int y));
00460 extern void APIENTRY glutPassiveMotionFunc(void (*func)(int x, int y));
00461 extern void APIENTRY glutEntryFunc(void (*func)(int state));
00462 extern void APIENTRY glutVisibilityFunc(void (*func)(int state));
00463 extern void APIENTRY glutIdleFunc(void (*func)(void));
00464 extern void APIENTRY glutTimerFunc(unsigned int millis, void (*func)(int value), int value);
00465 extern void APIENTRY glutMenuStateFunc(void (*func)(int state));
00466 #if (GLUT_API_VERSION >= 2)
00467 extern void APIENTRY glutSpecialFunc(void (*func)(int key, int x, int y));
00468 extern void APIENTRY glutSpaceballMotionFunc(void (*func)(int x, int y, int z));
00469 extern void APIENTRY glutSpaceballRotateFunc(void (*func)(int x, int y, int z));
00470 extern void APIENTRY glutSpaceballButtonFunc(void (*func)(int button, int state));
00471 extern void APIENTRY glutButtonBoxFunc(void (*func)(int button, int state));
00472 extern void APIENTRY glutDialsFunc(void (*func)(int dial, int value));
00473 extern void APIENTRY glutTabletMotionFunc(void (*func)(int x, int y));
00474 extern void APIENTRY glutTabletButtonFunc(void (*func)(int button, int state, int x, int y));
00475 #if (GLUT_API_VERSION >= 3)
00476 extern void APIENTRY glutMenuStatusFunc(void (*func)(int status, int x, int y));
00477 extern void APIENTRY glutOverlayDisplayFunc(void (*func)(void));
00478 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00479 extern void APIENTRY glutWindowStatusFunc(void (*func)(int state));
00480 #endif
00481 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00482 extern void APIENTRY glutKeyboardUpFunc(void (*func)(unsigned char key, int x, int y));
00483 extern void APIENTRY glutSpecialUpFunc(void (*func)(int key, int x, int y));
00484 extern void APIENTRY glutJoystickFunc(void (*func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
00485 #endif
00486 #endif
00487 #endif
00488 
00489 /* GLUT color index sub-API. */
00490 extern void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
00491 extern GLfloat APIENTRY glutGetColor(int ndx, int component);
00492 extern void APIENTRY glutCopyColormap(int win);
00493 
00494 /* GLUT state retrieval sub-API. */
00495 extern int APIENTRY glutGet(GLenum type);
00496 extern int APIENTRY glutDeviceGet(GLenum type);
00497 #if (GLUT_API_VERSION >= 2)
00498 /* GLUT extension support sub-API */
00499 extern int APIENTRY glutExtensionSupported(const char *name);
00500 #endif
00501 #if (GLUT_API_VERSION >= 3)
00502 extern int APIENTRY glutGetModifiers(void);
00503 extern int APIENTRY glutLayerGet(GLenum type);
00504 #endif
00505 
00506 /* GLUT font sub-API */
00507 extern void APIENTRY glutBitmapCharacter(void *font, int character);
00508 extern int APIENTRY glutBitmapWidth(void *font, int character);
00509 extern void APIENTRY glutStrokeCharacter(void *font, int character);
00510 extern int APIENTRY glutStrokeWidth(void *font, int character);
00511 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00512 extern int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
00513 extern int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
00514 #endif
00515 
00516 /* GLUT pre-built models sub-API */
00517 extern void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
00518 extern void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
00519 extern void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
00520 extern void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
00521 extern void APIENTRY glutWireCube(GLdouble size);
00522 extern void APIENTRY glutSolidCube(GLdouble size);
00523 extern void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
00524 extern void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
00525 extern void APIENTRY glutWireDodecahedron(void);
00526 extern void APIENTRY glutSolidDodecahedron(void);
00527 extern void APIENTRY glutWireTeapot(GLdouble size);
00528 extern void APIENTRY glutSolidTeapot(GLdouble size);
00529 extern void APIENTRY glutWireOctahedron(void);
00530 extern void APIENTRY glutSolidOctahedron(void);
00531 extern void APIENTRY glutWireTetrahedron(void);
00532 extern void APIENTRY glutSolidTetrahedron(void);
00533 extern void APIENTRY glutWireIcosahedron(void);
00534 extern void APIENTRY glutSolidIcosahedron(void);
00535 
00536 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00537 /* GLUT video resize sub-API. */
00538 extern int APIENTRY glutVideoResizeGet(GLenum param);
00539 extern void APIENTRY glutSetupVideoResizing(void);
00540 extern void APIENTRY glutStopVideoResizing(void);
00541 extern void APIENTRY glutVideoResize(int x, int y, int width, int height);
00542 extern void APIENTRY glutVideoPan(int x, int y, int width, int height);
00543 
00544 /* GLUT debugging sub-API. */
00545 extern void APIENTRY glutReportErrors(void);
00546 #endif
00547 
00548 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00549 /* GLUT device control sub-API. */
00550 /* glutSetKeyRepeat modes. */
00551 #define GLUT_KEY_REPEAT_OFF             0
00552 #define GLUT_KEY_REPEAT_ON              1
00553 #define GLUT_KEY_REPEAT_DEFAULT         2
00554 
00555 /* Joystick button masks. */
00556 #define GLUT_JOYSTICK_BUTTON_A          1
00557 #define GLUT_JOYSTICK_BUTTON_B          2
00558 #define GLUT_JOYSTICK_BUTTON_C          4
00559 #define GLUT_JOYSTICK_BUTTON_D          8
00560 
00561 extern void APIENTRY glutIgnoreKeyRepeat(int ignore);
00562 extern void APIENTRY glutSetKeyRepeat(int repeatMode);
00563 extern void APIENTRY glutForceJoystickFunc(void);
00564 
00565 /* GLUT game mode sub-API. */
00566 /* glutGameModeGet. */
00567 #define GLUT_GAME_MODE_ACTIVE           0
00568 #define GLUT_GAME_MODE_POSSIBLE         1
00569 #define GLUT_GAME_MODE_WIDTH            2
00570 #define GLUT_GAME_MODE_HEIGHT           3
00571 #define GLUT_GAME_MODE_PIXEL_DEPTH      4
00572 #define GLUT_GAME_MODE_REFRESH_RATE     5
00573 #define GLUT_GAME_MODE_DISPLAY_CHANGED  6
00574 
00575 extern void APIENTRY glutGameModeString(const char *string);
00576 extern int APIENTRY glutEnterGameMode(void);
00577 extern void APIENTRY glutLeaveGameMode(void);
00578 extern int APIENTRY glutGameModeGet(GLenum mode);
00579 #endif
00580 
00581 #ifdef __cplusplus
00582 }
00583 
00584 #endif
00585 
00586 #ifdef GLUT_APIENTRY_DEFINED
00587 # undef GLUT_APIENTRY_DEFINED
00588 # undef APIENTRY
00589 #endif
00590 
00591 #ifdef GLUT_WINGDIAPI_DEFINED
00592 # undef GLUT_WINGDIAPI_DEFINED
00593 # undef WINGDIAPI
00594 #endif
00595 
00596 #endif                  /* __glut_h__ */


nao_openni
Author(s): Bener SUAY
autogenerated on Mon Jan 6 2014 11:27:51