glutGet (3) - Linux Manuals

glutGet: Allows you to query some general state/option variables.

NAME

glutGet - Allows you to query some general state/option variables.

LIBRARY

OpenGLUT - state

SYNOPSIS

In openglut.h Ft int Fn glutGet GLenum eWhat

PARAMETERS

Bf Em
 eWhat Ef
    Enumerated parameter ID.

DESCRIPTION

This function permits you to query for the current value of many different OpenGLUT state variables. The current list is:


  Bf Sy
 GLUT_ACTION_ON_WINDOW_CLOSE Ef
 
Allows you to do something other than die if the user closes one of your windows.


  Bf Sy
 GLUT_DISPLAY_MODE_POSSIBLE Ef
 


  Bf Sy
 GLUT_ELAPSED_TIME Ef
 


  Bf Sy
 GLUT_INIT_DISPLAY_MODE Ef
 


  Bf Sy
 GLUT_INIT_STATE Ef
 


  Bf Sy
 GLUT_INIT_WINDOW_HEIGHT Ef
 


  Bf Sy
 GLUT_INIT_WINDOW_WIDTH Ef
 


  Bf Sy
 GLUT_INIT_WINDOW_X Ef
 


  Bf Sy
 GLUT_INIT_WINDOW_Y Ef
 


  Bf Sy
 GLUT_MENU_NUM_ITEMS Ef
 


  Bf Sy
 GLUT_RENDERING_CONTEXT Ef
 
Allows you to specify context-sharing when you open new windows.


  Bf Sy
 GLUT_SCREEN_HEIGHT Ef
 


  Bf Sy
 GLUT_SCREEN_HEIGHT_MM Ef
 
Height in millimeters.


  Bf Sy
 GLUT_SCREEN_WIDTH Ef
 


  Bf Sy
 GLUT_SCREEN_WIDTH_MM Ef
 
Width in millimeters.


  Bf Sy
 GLUT_VERSION Ef
 


  Bf Sy
 GLUT_WINDOW_ACCUM_ALPHA_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_ACCUM_BLUE_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_ACCUM_GREEN_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_ACCUM_RED_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_ALPHA_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_BLUE_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_BORDER_WIDTH Ef
 


  Bf Sy
 GLUT_WINDOW_BUFFER_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_COLORMAP_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_CURSOR Ef
 


  Bf Sy
 GLUT_WINDOW_DEPTH_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_DOUBLEBUFFER Ef
 


  Bf Sy
 GLUT_WINDOW_FORMAT_ID Ef
 
System dependant.


  Bf Sy
 GLUT_WINDOW_GREEN_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_HEADER_HEIGHT Ef
 


  Bf Sy
 GLUT_WINDOW_HEIGHT Ef
 


  Bf Sy
 GLUT_WINDOW_NUM_CHILDREN Ef
 


  Bf Sy
 GLUT_WINDOW_NUM_SAMPLES Ef
 


  Bf Sy
 GLUT_WINDOW_PARENT Ef
 


  Bf Sy
 GLUT_WINDOW_RED_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_RGBA Ef
 


  Bf Sy
 GLUT_WINDOW_STENCIL_SIZE Ef
 


  Bf Sy
 GLUT_WINDOW_STEREO Ef
 


  Bf Sy
 GLUT_WINDOW_WIDTH Ef
 


  Bf Sy
 GLUT_WINDOW_X Ef
 


  Bf Sy
 GLUT_WINDOW_Y Ef
 

Most of the above are very obvious, and so full documentation is postponed for now.

TODO

Go back and flesh out the above list.

This function is a bit messy, especially the WINCE part. Fix.

Lots of code uses return to hop out. Since it's such a sprawling function, it's easy to be in the middle and not be 100% sure if there's anything important at the end of the function, or if it is safe to just "drop out" of the current case and head for the bottom.

Causes crashes (assertion failure) if you call this before having called glutInit()---other than GLUT_INIT_STATE and GLUT_ELAPSED_TIME. Because various things can cause OpenGLUT to become deinitialized, we should probably either return default values of some kind or do minimal initialization if we are called without proper initialization.