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, 2000, 2006. */
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) || defined(__CYGWIN__)
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    /* This would put tons of macros and crap in our clean name space. */
00017 #  define  WIN32_LEAN_AND_MEAN
00018 #  include <windows.h>
00019 # else
00020    /* XXX This is from Win32's <windef.h> */
00021 #  ifndef APIENTRY
00022 #   define GLUT_APIENTRY_DEFINED
00023     /* Cygwin and MingW32 are two free GNU-based Open Source compilation
00024        environments for Win32.  Note that __CYGWIN32__ is deprecated
00025        in favor of simply __CYGWIN__. */
00026 #   if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
00027 #    if defined(__CYGWIN__)
00028 #     define APIENTRY __stdcall
00029 #    else
00030 #     ifdef i386
00031 #      define APIENTRY __attribute__((stdcall))
00032 #     else
00033 #      define APIENTRY
00034 #     endif
00035 #    endif
00036 #   else
00037 #    if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
00038 #     define APIENTRY __stdcall
00039 #    else
00040 #     define APIENTRY
00041 #    endif
00042 #   endif
00043 #  endif
00044    /* XXX This is from Win32's <winnt.h> */
00045 #  ifndef CALLBACK
00046 #   if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
00047 #    ifndef __stdcall
00048 #     define __stdcall __attribute__((stdcall))
00049 #    endif 
00050 #    define CALLBACK __stdcall
00051 #   else
00052 #    if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
00053 #     define CALLBACK __stdcall
00054 #    else
00055 #     define CALLBACK
00056 #    endif
00057 #   endif
00058 #  endif
00059    /* XXX This is from Win32's <wingdi.h> and <winnt.h> */
00060 #  ifndef WINGDIAPI
00061 #   define GLUT_WINGDIAPI_DEFINED
00062 #   if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
00063 #    define WINGDIAPI
00064 #   else
00065 #    define WINGDIAPI __declspec(dllimport)
00066 #   endif
00067 #  endif
00068 #  if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
00069     /* Rely on Cygwin32/MingW32 <stddef.h> to set wchar_t. */
00070     /* XXX Warning.  The Cygwin32/MingW32 definition for wchar_t
00071        is an "int" instead of the "short" used by Windows. */
00072 #   include <stddef.h>
00073 #  else
00074     /* XXX This is from Win32's <ctype.h> */
00075 #   ifndef _WCHAR_T_DEFINED
00076 typedef unsigned short wchar_t;
00077 #    define _WCHAR_T_DEFINED
00078 #   endif
00079 #  endif
00080 # endif
00081 
00082 /* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
00083    in your compile preprocessor options (Microsoft Visual C only). */
00084 # if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA) && defined(_MSC_VER)
00085 #  pragma comment (lib, "winmm.lib")      /* link with Windows MultiMedia lib */
00086 #  pragma comment (lib, "user32.lib")     /* link with Windows User lib */
00087 #  pragma comment (lib, "gdi32.lib")      /* link with Windows GDI lib */
00088 /* To enable automatic SGI OpenGL for Windows library usage for GLUT,
00089    define GLUT_USE_SGI_OPENGL in your compile preprocessor options.  */
00090 #  ifdef GLUT_USE_SGI_OPENGL
00091 #   pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */
00092 #   pragma comment (lib, "glu.lib")    /* link with SGI OpenGL Utility lib */
00093 #   if defined(GLUT_STATIC_LIB)
00094 #    pragma comment (lib, "glutstatic.lib")   /* link with static Win32 GLUT lib */
00095 #   else
00096 #    pragma comment (lib, "glut.lib")   /* link with Win32 GLUT lib */
00097 #   endif
00098 #  else
00099 #   pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
00100 #   pragma comment (lib, "glu32.lib")    /* link with Microsoft OpenGL Utility lib */
00101 #   if defined(GLUT_STATIC_LIB)
00102 #    pragma comment (lib, "glutstatic.lib")   /* link with static Win32 GLUT lib */
00103 #   else
00104 #    pragma comment (lib, "glut32.lib")   /* link with Win32 GLUT lib */
00105 #   endif
00106 #  endif
00107 # endif
00108 
00109 /* To disable supression of annoying warnings about floats being promoted
00110    to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor
00111    options. */
00112 # if defined(_MSC_VER) && !defined(GLUT_NO_WARNING_DISABLE)
00113 #  pragma warning (disable:4244)  /* Disable bogus VC++ 4.2 conversion warnings. */
00114 #  pragma warning (disable:4305)  /* VC++ 5.0 version of above warning. */
00115 # endif
00116 
00117 /* Win32 has an annoying issue where there are multiple C run-time
00118    libraries (CRTs).  If the executable is linked with a different CRT
00119    from the GLUT DLL, the GLUT DLL will not share the same CRT static
00120    data seen by the executable.  In particular, atexit callbacks registered
00121    in the executable will not be called if GLUT calls its (different)
00122    exit routine).  GLUT is typically built with the
00123    "/MD" option (the CRT with multithreading DLL support), but the Visual
00124    C++ linker default is "/ML" (the single threaded CRT).
00125 
00126    One workaround to this issue is requiring users to always link with
00127    the same CRT as GLUT is compiled with.  That requires users supply a
00128    non-standard option.  GLUT 3.7 has its own built-in workaround where
00129    the executable's "exit" function pointer is covertly passed to GLUT.
00130    GLUT then calls the executable's exit function pointer to ensure that
00131    any "atexit" calls registered by the application are called if GLUT
00132    needs to exit.
00133 
00134    Note that the __glut*WithExit routines should NEVER be called directly.
00135    To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
00136 
00137 /* XXX This is from Win32's <process.h> */
00138 # if !defined(_MSC_VER) && !defined(__cdecl)
00139    /* Define __cdecl for non-Microsoft compilers. */
00140 #  define __cdecl
00141 #  define GLUT_DEFINED___CDECL
00142 # endif
00143 # ifndef _CRTIMP
00144 #  ifdef _NTSDK
00145     /* Definition compatible with NT SDK */
00146 #   define _CRTIMP
00147 #  else
00148     /* Current definition */
00149 #   ifdef _DLL
00150 #    define _CRTIMP __declspec(dllimport)
00151 #   else
00152 #    define _CRTIMP
00153 #   endif
00154 #  endif
00155 #  define GLUT_DEFINED__CRTIMP
00156 # endif
00157 
00158 /* GLUT API entry point declarations for Win32. */
00159 # ifdef GLUT_BUILDING_LIB
00160 /* MSDN article 835326 says "When you build a DLL by using the 64-bit
00161    version of the Microsoft Visual C++ Compiler and Linker, you may
00162    receive Linker error number LNK4197 if a function has been declared
00163    for export more than one time."  GLUT builds with glut.def that
00164    declares GLUT's EXPORTS list so do not use __declspec(dllexport)
00165    to keep 64-bit compiler happy. */
00166 #  define GLUTAPI /*__declspec(dllexport)*/
00167 # else
00168 #  ifdef _DLL
00169 #   define GLUTAPI __declspec(dllimport)
00170 #  else
00171 #   define GLUTAPI extern
00172 #  endif
00173 # endif
00174 
00175 /* GLUT callback calling convention for Win32. */
00176 # define GLUTCALLBACK __cdecl
00177 
00178 # if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
00179 #  define GLUTAPIENTRY __stdcall
00180 # else
00181 #  define GLUTAPIENTRY
00182 # endif
00183 
00184 #endif  /* _WIN32 */
00185 
00186 #include <GL/gl.h>
00187 #include <GL/glu.h>
00188 
00189 #ifdef __cplusplus
00190 extern "C" {
00191 #endif
00192 
00193 #if defined(_WIN32) || defined(__CYGWIN__)
00194 # ifndef GLUT_BUILDING_LIB
00195 #  if __BORLANDC__
00196 #   if defined(_BUILDRTLDLL)
00197 void __cdecl __export exit(int __status);
00198 #   else
00199 void __cdecl exit(int __status);
00200 #   endif
00201 #  else
00202 #   if _MSC_VER >= 1200
00203      extern _CRTIMP __declspec(noreturn) void   __cdecl exit(int);
00204 #   else
00205      extern _CRTIMP void __cdecl exit(int);
00206 #   endif
00207 #  endif
00208 # endif
00209 #else
00210 /* non-Win32 case. */
00211 /* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */
00212 # define APIENTRY
00213 # define GLUT_APIENTRY_DEFINED
00214 # define CALLBACK
00215 /* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */
00216 # define GLUTAPI extern
00217 # define GLUTAPIENTRY
00218 # define GLUTCALLBACK
00219 /* Prototype exit for the non-Win32 case (see above). */
00220 # ifdef __GNUC__
00221 extern void exit(int __status) __attribute__((__noreturn__));
00222 # else
00223 extern void exit(int);
00224 # endif
00225 #endif
00226 
00249 #ifndef GLUT_API_VERSION  /* allow this to be overriden */
00250 #define GLUT_API_VERSION                3
00251 #endif
00252 
00293 #ifndef GLUT_XLIB_IMPLEMENTATION  /* Allow this to be overriden. */
00294 #define GLUT_XLIB_IMPLEMENTATION        17
00295 #endif
00296 
00297 /* Display mode bit masks. */
00298 #define GLUT_RGB                        0
00299 #define GLUT_RGBA                       GLUT_RGB
00300 #define GLUT_INDEX                      1
00301 #define GLUT_SINGLE                     0
00302 #define GLUT_DOUBLE                     2
00303 #define GLUT_ACCUM                      4
00304 #define GLUT_ALPHA                      8
00305 #define GLUT_DEPTH                      16
00306 #define GLUT_STENCIL                    32
00307 #if (GLUT_API_VERSION >= 2)
00308 #define GLUT_MULTISAMPLE                128
00309 #define GLUT_STEREO                     256
00310 #endif
00311 #if (GLUT_API_VERSION >= 3)
00312 #define GLUT_LUMINANCE                  512
00313 #endif
00314 
00315 /* Mouse buttons. */
00316 #define GLUT_LEFT_BUTTON                0
00317 #define GLUT_MIDDLE_BUTTON              1
00318 #define GLUT_RIGHT_BUTTON               2
00319 
00320 /* Mouse button  state. */
00321 #define GLUT_DOWN                       0
00322 #define GLUT_UP                         1
00323 
00324 #if (GLUT_API_VERSION >= 2)
00325 /* function keys */
00326 #define GLUT_KEY_F1                     1
00327 #define GLUT_KEY_F2                     2
00328 #define GLUT_KEY_F3                     3
00329 #define GLUT_KEY_F4                     4
00330 #define GLUT_KEY_F5                     5
00331 #define GLUT_KEY_F6                     6
00332 #define GLUT_KEY_F7                     7
00333 #define GLUT_KEY_F8                     8
00334 #define GLUT_KEY_F9                     9
00335 #define GLUT_KEY_F10                    10
00336 #define GLUT_KEY_F11                    11
00337 #define GLUT_KEY_F12                    12
00338 /* directional keys */
00339 #define GLUT_KEY_LEFT                   100
00340 #define GLUT_KEY_UP                     101
00341 #define GLUT_KEY_RIGHT                  102
00342 #define GLUT_KEY_DOWN                   103
00343 #define GLUT_KEY_PAGE_UP                104
00344 #define GLUT_KEY_PAGE_DOWN              105
00345 #define GLUT_KEY_HOME                   106
00346 #define GLUT_KEY_END                    107
00347 #define GLUT_KEY_INSERT                 108
00348 #endif
00349 
00350 /* Entry/exit  state. */
00351 #define GLUT_LEFT                       0
00352 #define GLUT_ENTERED                    1
00353 
00354 /* Menu usage  state. */
00355 #define GLUT_MENU_NOT_IN_USE            0
00356 #define GLUT_MENU_IN_USE                1
00357 
00358 /* Visibility  state. */
00359 #define GLUT_NOT_VISIBLE                0
00360 #define GLUT_VISIBLE                    1
00361 
00362 /* Window status  state. */
00363 #define GLUT_HIDDEN                     0
00364 #define GLUT_FULLY_RETAINED             1
00365 #define GLUT_PARTIALLY_RETAINED         2
00366 #define GLUT_FULLY_COVERED              3
00367 
00368 /* Color index component selection values. */
00369 #define GLUT_RED                        0
00370 #define GLUT_GREEN                      1
00371 #define GLUT_BLUE                       2
00372 
00373 #ifdef _WIN32
00374 /* Stroke font constants (use these in GLUT program). */
00375 #define GLUT_STROKE_ROMAN               ((void*)0)
00376 #define GLUT_STROKE_MONO_ROMAN          ((void*)1)
00377 
00378 /* Bitmap font constants (use these in GLUT program). */
00379 #define GLUT_BITMAP_9_BY_15             ((void*)2)
00380 #define GLUT_BITMAP_8_BY_13             ((void*)3)
00381 #define GLUT_BITMAP_TIMES_ROMAN_10      ((void*)4)
00382 #define GLUT_BITMAP_TIMES_ROMAN_24      ((void*)5)
00383 #if (GLUT_API_VERSION >= 3)
00384 #define GLUT_BITMAP_HELVETICA_10        ((void*)6)
00385 #define GLUT_BITMAP_HELVETICA_12        ((void*)7)
00386 #define GLUT_BITMAP_HELVETICA_18        ((void*)8)
00387 #endif
00388 #else
00389 /* Stroke font opaque addresses (use constants instead in source code). */
00390 GLUTAPI void *glutStrokeRoman;
00391 GLUTAPI void *glutStrokeMonoRoman;
00392 
00393 /* Stroke font constants (use these in GLUT program). */
00394 #define GLUT_STROKE_ROMAN               (&glutStrokeRoman)
00395 #define GLUT_STROKE_MONO_ROMAN          (&glutStrokeMonoRoman)
00396 
00397 /* Bitmap font opaque addresses (use constants instead in source code). */
00398 GLUTAPI void *glutBitmap9By15;
00399 GLUTAPI void *glutBitmap8By13;
00400 GLUTAPI void *glutBitmapTimesRoman10;
00401 GLUTAPI void *glutBitmapTimesRoman24;
00402 GLUTAPI void *glutBitmapHelvetica10;
00403 GLUTAPI void *glutBitmapHelvetica12;
00404 GLUTAPI void *glutBitmapHelvetica18;
00405 
00406 /* Bitmap font constants (use these in GLUT program). */
00407 #define GLUT_BITMAP_9_BY_15             (&glutBitmap9By15)
00408 #define GLUT_BITMAP_8_BY_13             (&glutBitmap8By13)
00409 #define GLUT_BITMAP_TIMES_ROMAN_10      (&glutBitmapTimesRoman10)
00410 #define GLUT_BITMAP_TIMES_ROMAN_24      (&glutBitmapTimesRoman24)
00411 #if (GLUT_API_VERSION >= 3)
00412 #define GLUT_BITMAP_HELVETICA_10        (&glutBitmapHelvetica10)
00413 #define GLUT_BITMAP_HELVETICA_12        (&glutBitmapHelvetica12)
00414 #define GLUT_BITMAP_HELVETICA_18        (&glutBitmapHelvetica18)
00415 #endif
00416 #endif
00417 
00418 /* glutGet parameters. */
00419 #define GLUT_WINDOW_X                   ((GLenum) 100)
00420 #define GLUT_WINDOW_Y                   ((GLenum) 101)
00421 #define GLUT_WINDOW_WIDTH               ((GLenum) 102)
00422 #define GLUT_WINDOW_HEIGHT              ((GLenum) 103)
00423 #define GLUT_WINDOW_BUFFER_SIZE         ((GLenum) 104)
00424 #define GLUT_WINDOW_STENCIL_SIZE        ((GLenum) 105)
00425 #define GLUT_WINDOW_DEPTH_SIZE          ((GLenum) 106)
00426 #define GLUT_WINDOW_RED_SIZE            ((GLenum) 107)
00427 #define GLUT_WINDOW_GREEN_SIZE          ((GLenum) 108)
00428 #define GLUT_WINDOW_BLUE_SIZE           ((GLenum) 109)
00429 #define GLUT_WINDOW_ALPHA_SIZE          ((GLenum) 110)
00430 #define GLUT_WINDOW_ACCUM_RED_SIZE      ((GLenum) 111)
00431 #define GLUT_WINDOW_ACCUM_GREEN_SIZE    ((GLenum) 112)
00432 #define GLUT_WINDOW_ACCUM_BLUE_SIZE     ((GLenum) 113)
00433 #define GLUT_WINDOW_ACCUM_ALPHA_SIZE    ((GLenum) 114)
00434 #define GLUT_WINDOW_DOUBLEBUFFER        ((GLenum) 115)
00435 #define GLUT_WINDOW_RGBA                ((GLenum) 116)
00436 #define GLUT_WINDOW_PARENT              ((GLenum) 117)
00437 #define GLUT_WINDOW_NUM_CHILDREN        ((GLenum) 118)
00438 #define GLUT_WINDOW_COLORMAP_SIZE       ((GLenum) 119)
00439 #if (GLUT_API_VERSION >= 2)
00440 #define GLUT_WINDOW_NUM_SAMPLES         ((GLenum) 120)
00441 #define GLUT_WINDOW_STEREO              ((GLenum) 121)
00442 #endif
00443 #if (GLUT_API_VERSION >= 3)
00444 #define GLUT_WINDOW_CURSOR              ((GLenum) 122)
00445 #endif
00446 #define GLUT_SCREEN_WIDTH               ((GLenum) 200)
00447 #define GLUT_SCREEN_HEIGHT              ((GLenum) 201)
00448 #define GLUT_SCREEN_WIDTH_MM            ((GLenum) 202)
00449 #define GLUT_SCREEN_HEIGHT_MM           ((GLenum) 203)
00450 #define GLUT_MENU_NUM_ITEMS             ((GLenum) 300)
00451 #define GLUT_DISPLAY_MODE_POSSIBLE      ((GLenum) 400)
00452 #define GLUT_INIT_WINDOW_X              ((GLenum) 500)
00453 #define GLUT_INIT_WINDOW_Y              ((GLenum) 501)
00454 #define GLUT_INIT_WINDOW_WIDTH          ((GLenum) 502)
00455 #define GLUT_INIT_WINDOW_HEIGHT         ((GLenum) 503)
00456 #define GLUT_INIT_DISPLAY_MODE          ((GLenum) 504)
00457 #if (GLUT_API_VERSION >= 2)
00458 #define GLUT_ELAPSED_TIME               ((GLenum) 700)
00459 #endif
00460 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00461 #define GLUT_WINDOW_FORMAT_ID           ((GLenum) 123)
00462 #endif
00463 
00464 #if (GLUT_API_VERSION >= 2)
00465 /* glutDeviceGet parameters. */
00466 #define GLUT_HAS_KEYBOARD               ((GLenum) 600)
00467 #define GLUT_HAS_MOUSE                  ((GLenum) 601)
00468 #define GLUT_HAS_SPACEBALL              ((GLenum) 602)
00469 #define GLUT_HAS_DIAL_AND_BUTTON_BOX    ((GLenum) 603)
00470 #define GLUT_HAS_TABLET                 ((GLenum) 604)
00471 #define GLUT_NUM_MOUSE_BUTTONS          ((GLenum) 605)
00472 #define GLUT_NUM_SPACEBALL_BUTTONS      ((GLenum) 606)
00473 #define GLUT_NUM_BUTTON_BOX_BUTTONS     ((GLenum) 607)
00474 #define GLUT_NUM_DIALS                  ((GLenum) 608)
00475 #define GLUT_NUM_TABLET_BUTTONS         ((GLenum) 609)
00476 #endif
00477 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00478 #define GLUT_DEVICE_IGNORE_KEY_REPEAT   ((GLenum) 610)
00479 #define GLUT_DEVICE_KEY_REPEAT          ((GLenum) 611)
00480 #define GLUT_HAS_JOYSTICK               ((GLenum) 612)
00481 #define GLUT_OWNS_JOYSTICK              ((GLenum) 613)
00482 #define GLUT_JOYSTICK_BUTTONS           ((GLenum) 614)
00483 #define GLUT_JOYSTICK_AXES              ((GLenum) 615)
00484 #define GLUT_JOYSTICK_POLL_RATE         ((GLenum) 616)
00485 #endif
00486 
00487 #if (GLUT_API_VERSION >= 3)
00488 /* glutLayerGet parameters. */
00489 #define GLUT_OVERLAY_POSSIBLE           ((GLenum) 800)
00490 #define GLUT_LAYER_IN_USE               ((GLenum) 801)
00491 #define GLUT_HAS_OVERLAY                ((GLenum) 802)
00492 #define GLUT_TRANSPARENT_INDEX          ((GLenum) 803)
00493 #define GLUT_NORMAL_DAMAGED             ((GLenum) 804)
00494 #define GLUT_OVERLAY_DAMAGED            ((GLenum) 805)
00495 
00496 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00497 /* glutVideoResizeGet parameters. */
00498 #define GLUT_VIDEO_RESIZE_POSSIBLE      ((GLenum) 900)
00499 #define GLUT_VIDEO_RESIZE_IN_USE        ((GLenum) 901)
00500 #define GLUT_VIDEO_RESIZE_X_DELTA       ((GLenum) 902)
00501 #define GLUT_VIDEO_RESIZE_Y_DELTA       ((GLenum) 903)
00502 #define GLUT_VIDEO_RESIZE_WIDTH_DELTA   ((GLenum) 904)
00503 #define GLUT_VIDEO_RESIZE_HEIGHT_DELTA  ((GLenum) 905)
00504 #define GLUT_VIDEO_RESIZE_X             ((GLenum) 906)
00505 #define GLUT_VIDEO_RESIZE_Y             ((GLenum) 907)
00506 #define GLUT_VIDEO_RESIZE_WIDTH         ((GLenum) 908)
00507 #define GLUT_VIDEO_RESIZE_HEIGHT        ((GLenum) 909)
00508 #endif
00509 
00510 /* glutUseLayer parameters. */
00511 #define GLUT_NORMAL                     ((GLenum) 0)
00512 #define GLUT_OVERLAY                    ((GLenum) 1)
00513 
00514 /* glutGetModifiers return mask. */
00515 #define GLUT_ACTIVE_SHIFT               1
00516 #define GLUT_ACTIVE_CTRL                2
00517 #define GLUT_ACTIVE_ALT                 4
00518 
00519 /* glutSetCursor parameters. */
00520 /* Basic arrows. */
00521 #define GLUT_CURSOR_RIGHT_ARROW         0
00522 #define GLUT_CURSOR_LEFT_ARROW          1
00523 /* Symbolic cursor shapes. */
00524 #define GLUT_CURSOR_INFO                2
00525 #define GLUT_CURSOR_DESTROY             3
00526 #define GLUT_CURSOR_HELP                4
00527 #define GLUT_CURSOR_CYCLE               5
00528 #define GLUT_CURSOR_SPRAY               6
00529 #define GLUT_CURSOR_WAIT                7
00530 #define GLUT_CURSOR_TEXT                8
00531 #define GLUT_CURSOR_CROSSHAIR           9
00532 /* Directional cursors. */
00533 #define GLUT_CURSOR_UP_DOWN             10
00534 #define GLUT_CURSOR_LEFT_RIGHT          11
00535 /* Sizing cursors. */
00536 #define GLUT_CURSOR_TOP_SIDE            12
00537 #define GLUT_CURSOR_BOTTOM_SIDE         13
00538 #define GLUT_CURSOR_LEFT_SIDE           14
00539 #define GLUT_CURSOR_RIGHT_SIDE          15
00540 #define GLUT_CURSOR_TOP_LEFT_CORNER     16
00541 #define GLUT_CURSOR_TOP_RIGHT_CORNER    17
00542 #define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
00543 #define GLUT_CURSOR_BOTTOM_LEFT_CORNER  19
00544 /* Inherit from parent window. */
00545 #define GLUT_CURSOR_INHERIT             100
00546 /* Blank cursor. */
00547 #define GLUT_CURSOR_NONE                101
00548 /* Fullscreen crosshair (if available). */
00549 #define GLUT_CURSOR_FULL_CROSSHAIR      102
00550 #endif
00551 
00552 /* GLUT initialization sub-API. */
00553 GLUTAPI void GLUTAPIENTRY glutInit(int *argcp, char **argv);
00554 #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
00555 GLUTAPI void GLUTAPIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
00556 #ifndef GLUT_BUILDING_LIB
00557 static void GLUTAPIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
00558 #define glutInit glutInit_ATEXIT_HACK
00559 #endif
00560 #endif
00561 GLUTAPI void GLUTAPIENTRY glutInitDisplayMode(unsigned int mode);
00562 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00563 GLUTAPI void GLUTAPIENTRY glutInitDisplayString(const char *string);
00564 #endif
00565 GLUTAPI void GLUTAPIENTRY glutInitWindowPosition(int x, int y);
00566 GLUTAPI void GLUTAPIENTRY glutInitWindowSize(int width, int height);
00567 GLUTAPI void GLUTAPIENTRY glutMainLoop(void);
00568 
00569 /* GLUT window sub-API. */
00570 GLUTAPI int GLUTAPIENTRY glutCreateWindow(const char *title);
00571 #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
00572 GLUTAPI int GLUTAPIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
00573 #ifndef GLUT_BUILDING_LIB
00574 static int GLUTAPIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
00575 #define glutCreateWindow glutCreateWindow_ATEXIT_HACK
00576 #endif
00577 #endif
00578 GLUTAPI int GLUTAPIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
00579 GLUTAPI void GLUTAPIENTRY glutDestroyWindow(int win);
00580 GLUTAPI void GLUTAPIENTRY glutPostRedisplay(void);
00581 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
00582 GLUTAPI void GLUTAPIENTRY glutPostWindowRedisplay(int win);
00583 #endif
00584 GLUTAPI void GLUTAPIENTRY glutSwapBuffers(void);
00585 GLUTAPI int GLUTAPIENTRY glutGetWindow(void);
00586 GLUTAPI void GLUTAPIENTRY glutSetWindow(int win);
00587 GLUTAPI void GLUTAPIENTRY glutSetWindowTitle(const char *title);
00588 GLUTAPI void GLUTAPIENTRY glutSetIconTitle(const char *title);
00589 GLUTAPI void GLUTAPIENTRY glutPositionWindow(int x, int y);
00590 GLUTAPI void GLUTAPIENTRY glutReshapeWindow(int width, int height);
00591 GLUTAPI void GLUTAPIENTRY glutPopWindow(void);
00592 GLUTAPI void GLUTAPIENTRY glutPushWindow(void);
00593 GLUTAPI void GLUTAPIENTRY glutIconifyWindow(void);
00594 GLUTAPI void GLUTAPIENTRY glutShowWindow(void);
00595 GLUTAPI void GLUTAPIENTRY glutHideWindow(void);
00596 #if (GLUT_API_VERSION >= 3)
00597 GLUTAPI void GLUTAPIENTRY glutFullScreen(void);
00598 GLUTAPI void GLUTAPIENTRY glutSetCursor(int cursor);
00599 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00600 GLUTAPI void GLUTAPIENTRY glutWarpPointer(int x, int y);
00601 #endif
00602 
00603 /* GLUT overlay sub-API. */
00604 GLUTAPI void GLUTAPIENTRY glutEstablishOverlay(void);
00605 GLUTAPI void GLUTAPIENTRY glutRemoveOverlay(void);
00606 GLUTAPI void GLUTAPIENTRY glutUseLayer(GLenum layer);
00607 GLUTAPI void GLUTAPIENTRY glutPostOverlayRedisplay(void);
00608 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
00609 GLUTAPI void GLUTAPIENTRY glutPostWindowOverlayRedisplay(int win);
00610 #endif
00611 GLUTAPI void GLUTAPIENTRY glutShowOverlay(void);
00612 GLUTAPI void GLUTAPIENTRY glutHideOverlay(void);
00613 #endif
00614 
00615 /* GLUT menu sub-API. */
00616 GLUTAPI int GLUTAPIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
00617 #if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
00618 GLUTAPI int GLUTAPIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
00619 #ifndef GLUT_BUILDING_LIB
00620 static int GLUTAPIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
00621 #define glutCreateMenu glutCreateMenu_ATEXIT_HACK
00622 #endif
00623 #endif
00624 GLUTAPI void GLUTAPIENTRY glutDestroyMenu(int menu);
00625 GLUTAPI int GLUTAPIENTRY glutGetMenu(void);
00626 GLUTAPI void GLUTAPIENTRY glutSetMenu(int menu);
00627 GLUTAPI void GLUTAPIENTRY glutAddMenuEntry(const char *label, int value);
00628 GLUTAPI void GLUTAPIENTRY glutAddSubMenu(const char *label, int submenu);
00629 GLUTAPI void GLUTAPIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
00630 GLUTAPI void GLUTAPIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
00631 GLUTAPI void GLUTAPIENTRY glutRemoveMenuItem(int item);
00632 GLUTAPI void GLUTAPIENTRY glutAttachMenu(int button);
00633 GLUTAPI void GLUTAPIENTRY glutDetachMenu(int button);
00634 
00635 /* GLUT window callback sub-API. */
00636 GLUTAPI void GLUTAPIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void));
00637 GLUTAPI void GLUTAPIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height));
00638 GLUTAPI void GLUTAPIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
00639 GLUTAPI void GLUTAPIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
00640 GLUTAPI void GLUTAPIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
00641 GLUTAPI void GLUTAPIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
00642 GLUTAPI void GLUTAPIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state));
00643 GLUTAPI void GLUTAPIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state));
00644 GLUTAPI void GLUTAPIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void));
00645 GLUTAPI void GLUTAPIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value);
00646 GLUTAPI void GLUTAPIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state));
00647 #if (GLUT_API_VERSION >= 2)
00648 GLUTAPI void GLUTAPIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
00649 GLUTAPI void GLUTAPIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
00650 GLUTAPI void GLUTAPIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
00651 GLUTAPI void GLUTAPIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state));
00652 GLUTAPI void GLUTAPIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state));
00653 GLUTAPI void GLUTAPIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value));
00654 GLUTAPI void GLUTAPIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
00655 GLUTAPI void GLUTAPIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
00656 #if (GLUT_API_VERSION >= 3)
00657 GLUTAPI void GLUTAPIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y));
00658 GLUTAPI void GLUTAPIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void));
00659 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00660 GLUTAPI void GLUTAPIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state));
00661 #endif
00662 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00663 GLUTAPI void GLUTAPIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
00664 GLUTAPI void GLUTAPIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
00665 GLUTAPI void GLUTAPIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
00666 #endif
00667 #endif
00668 #endif
00669 
00670 /* GLUT color index sub-API. */
00671 GLUTAPI void GLUTAPIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
00672 GLUTAPI GLfloat GLUTAPIENTRY glutGetColor(int ndx, int component);
00673 GLUTAPI void GLUTAPIENTRY glutCopyColormap(int win);
00674 
00675 /* GLUT state retrieval sub-API. */
00676 GLUTAPI int GLUTAPIENTRY glutGet(GLenum type);
00677 GLUTAPI int GLUTAPIENTRY glutDeviceGet(GLenum type);
00678 #if (GLUT_API_VERSION >= 2)
00679 /* GLUT extension support sub-API */
00680 GLUTAPI int GLUTAPIENTRY glutExtensionSupported(const char *name);
00681 #endif
00682 #if (GLUT_API_VERSION >= 3)
00683 GLUTAPI int GLUTAPIENTRY glutGetModifiers(void);
00684 GLUTAPI int GLUTAPIENTRY glutLayerGet(GLenum type);
00685 #endif
00686 
00687 /* GLUT font sub-API */
00688 GLUTAPI void GLUTAPIENTRY glutBitmapCharacter(void *font, int character);
00689 GLUTAPI int GLUTAPIENTRY glutBitmapWidth(void *font, int character);
00690 GLUTAPI void GLUTAPIENTRY glutStrokeCharacter(void *font, int character);
00691 GLUTAPI int GLUTAPIENTRY glutStrokeWidth(void *font, int character);
00692 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00693 GLUTAPI int GLUTAPIENTRY glutBitmapLength(void *font, const unsigned char *string);
00694 GLUTAPI int GLUTAPIENTRY glutStrokeLength(void *font, const unsigned char *string);
00695 #endif
00696 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 17)
00697 GLUTAPI float GLUTAPIENTRY glutStrokeWidthf(void *font, int character);
00698 GLUTAPI float GLUTAPIENTRY glutStrokeLengthf(void *font, const unsigned char *string);
00699 #endif
00700 
00701 /* GLUT pre-built models sub-API */
00702 GLUTAPI void GLUTAPIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
00703 GLUTAPI void GLUTAPIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
00704 GLUTAPI void GLUTAPIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
00705 GLUTAPI void GLUTAPIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
00706 GLUTAPI void GLUTAPIENTRY glutWireCube(GLdouble size);
00707 GLUTAPI void GLUTAPIENTRY glutSolidCube(GLdouble size);
00708 GLUTAPI void GLUTAPIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
00709 GLUTAPI void GLUTAPIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
00710 GLUTAPI void GLUTAPIENTRY glutWireDodecahedron(void);
00711 GLUTAPI void GLUTAPIENTRY glutSolidDodecahedron(void);
00712 GLUTAPI void GLUTAPIENTRY glutWireTeapot(GLdouble size);
00713 GLUTAPI void GLUTAPIENTRY glutSolidTeapot(GLdouble size);
00714 GLUTAPI void GLUTAPIENTRY glutWireOctahedron(void);
00715 GLUTAPI void GLUTAPIENTRY glutSolidOctahedron(void);
00716 GLUTAPI void GLUTAPIENTRY glutWireTetrahedron(void);
00717 GLUTAPI void GLUTAPIENTRY glutSolidTetrahedron(void);
00718 GLUTAPI void GLUTAPIENTRY glutWireIcosahedron(void);
00719 GLUTAPI void GLUTAPIENTRY glutSolidIcosahedron(void);
00720 
00721 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
00722 /* GLUT video resize sub-API. */
00723 GLUTAPI int GLUTAPIENTRY glutVideoResizeGet(GLenum param);
00724 GLUTAPI void GLUTAPIENTRY glutSetupVideoResizing(void);
00725 GLUTAPI void GLUTAPIENTRY glutStopVideoResizing(void);
00726 GLUTAPI void GLUTAPIENTRY glutVideoResize(int x, int y, int width, int height);
00727 GLUTAPI void GLUTAPIENTRY glutVideoPan(int x, int y, int width, int height);
00728 
00729 /* GLUT debugging sub-API. */
00730 GLUTAPI void GLUTAPIENTRY glutReportErrors(void);
00731 #endif
00732 
00733 #if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
00734 /* GLUT device control sub-API. */
00735 /* glutSetKeyRepeat modes. */
00736 #define GLUT_KEY_REPEAT_OFF             0
00737 #define GLUT_KEY_REPEAT_ON              1
00738 #define GLUT_KEY_REPEAT_DEFAULT         2
00739 
00740 /* Joystick button masks. */
00741 #define GLUT_JOYSTICK_BUTTON_A          1
00742 #define GLUT_JOYSTICK_BUTTON_B          2
00743 #define GLUT_JOYSTICK_BUTTON_C          4
00744 #define GLUT_JOYSTICK_BUTTON_D          8
00745 
00746 GLUTAPI void GLUTAPIENTRY glutIgnoreKeyRepeat(int ignore);
00747 GLUTAPI void GLUTAPIENTRY glutSetKeyRepeat(int repeatMode);
00748 GLUTAPI void GLUTAPIENTRY glutForceJoystickFunc(void);
00749 
00750 /* GLUT game mode sub-API. */
00751 /* glutGameModeGet. */
00752 #define GLUT_GAME_MODE_ACTIVE           ((GLenum) 0)
00753 #define GLUT_GAME_MODE_POSSIBLE         ((GLenum) 1)
00754 #define GLUT_GAME_MODE_WIDTH            ((GLenum) 2)
00755 #define GLUT_GAME_MODE_HEIGHT           ((GLenum) 3)
00756 #define GLUT_GAME_MODE_PIXEL_DEPTH      ((GLenum) 4)
00757 #define GLUT_GAME_MODE_REFRESH_RATE     ((GLenum) 5)
00758 #define GLUT_GAME_MODE_DISPLAY_CHANGED  ((GLenum) 6)
00759 
00760 GLUTAPI void GLUTAPIENTRY glutGameModeString(const char *string);
00761 GLUTAPI int GLUTAPIENTRY glutEnterGameMode(void);
00762 GLUTAPI void GLUTAPIENTRY glutLeaveGameMode(void);
00763 GLUTAPI int GLUTAPIENTRY glutGameModeGet(GLenum mode);
00764 #endif
00765 
00766 #ifdef __cplusplus
00767 }
00768 
00769 #endif
00770 
00771 #ifdef GLUT_APIENTRY_DEFINED
00772 # undef GLUT_APIENTRY_DEFINED
00773 # undef APIENTRY
00774 #endif
00775 
00776 #ifdef GLUT_WINGDIAPI_DEFINED
00777 # undef GLUT_WINGDIAPI_DEFINED
00778 # undef WINGDIAPI
00779 #endif
00780 
00781 #ifdef GLUT_DEFINED___CDECL
00782 # undef GLUT_DEFINED___CDECL
00783 # undef __cdecl
00784 #endif
00785 
00786 #ifdef GLUT_DEFINED__CRTIMP
00787 # undef GLUT_DEFINED__CRTIMP
00788 # undef _CRTIMP
00789 #endif
00790 
00791 #endif                  /* __glut_h__ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


rgbd_registration
Author(s): Ross Kidson
autogenerated on Thu May 23 2013 15:36:53