| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines