OpenGLUT Documentation
Introduction | Documentation | Examples | Proposals | Authors | Copying | Todo | Bugs | Links

State Query
[OpenGLUT API Reference]


Functions

int glutGet (GLenum eWhat)
void glutSetOption (GLenum eWhat, int value)

Detailed Description

OpenGLUT provides a certain amount of state to track modes of operation as well as status information on various objects such as OpenGLUT windows. Additionally, there is some static state information about OpenGLUT itself, and system-dependant state about the underlying window system.

The state module provides some support for modifying OpenGLUT state, as well as support for querying state.


Function Documentation

int glutGet GLenum  eWhat  ) 
 

Query an OpenGLUT option or state.

Parameters:
eWhat Enumerated parameter ID.
Query for the current value of one of many possible OpenGLUT state variables. The current list is:

  • GLUT_ACTION_ON_WINDOW_CLOSE
    Do something other than exit when the a window is closed via the window manager.

  • GLUT_DISPLAY_MODE_POSSIBLE

  • GLUT_ELAPSED_TIME

  • GLUT_INIT_DISPLAY_MODE

  • GLUT_INIT_STATE

  • GLUT_INIT_WINDOW_HEIGHT

  • GLUT_INIT_WINDOW_WIDTH

  • GLUT_INIT_WINDOW_X

  • GLUT_INIT_WINDOW_Y

  • GLUT_MENU_NUM_ITEMS

  • GLUT_RENDERING_CONTEXT
    OpenGL contexts shared with new windows.

  • GLUT_SCREEN_HEIGHT
    Screen height in pixels.

  • GLUT_SCREEN_HEIGHT_MM
    Screen height in millimeters.

  • GLUT_SCREEN_WIDTH
    Screen width in pixels.

  • GLUT_SCREEN_WIDTH_MM
    Screen width in millimeters.

  • GLUT_VERSION

  • GLUT_WINDOW_ACCUM_ALPHA_SIZE

  • GLUT_WINDOW_ACCUM_BLUE_SIZE

  • GLUT_WINDOW_ACCUM_GREEN_SIZE

  • GLUT_WINDOW_ACCUM_RED_SIZE

  • GLUT_WINDOW_ALPHA_SIZE

  • GLUT_WINDOW_BLUE_SIZE

  • GLUT_WINDOW_BORDER_WIDTH

  • GLUT_WINDOW_BUFFER_SIZE

  • GLUT_WINDOW_COLORMAP_SIZE

  • GLUT_WINDOW_CURSOR

  • GLUT_WINDOW_DEPTH_SIZE

  • GLUT_WINDOW_DOUBLEBUFFER

  • GLUT_WINDOW_FORMAT_ID
    System dependant.

  • GLUT_WINDOW_GREEN_SIZE

  • GLUT_WINDOW_HEADER_HEIGHT

  • GLUT_WINDOW_HEIGHT

  • GLUT_WINDOW_NUM_CHILDREN

  • GLUT_WINDOW_NUM_SAMPLES

  • GLUT_WINDOW_PARENT

  • GLUT_WINDOW_RED_SIZE

  • GLUT_WINDOW_RGBA

  • GLUT_WINDOW_STENCIL_SIZE

  • GLUT_WINDOW_STEREO

  • GLUT_WINDOW_WIDTH

  • GLUT_WINDOW_X

  • GLUT_WINDOW_Y

See also:
glutSetOption(), glutDeviceGet(), glutGetModifiers(), glutLayerGet()

void glutSetOption GLenum  eWhat,
int  value
 

Set an OpenGLUT option.

Parameters:
eWhat Enumerated parameter ID.
value New value.
Stores the value into a state variable named by eWhat.

Allowable eWhat IDs are:

  • GLUT_ACTION_ON_WINDOW_CLOSE
    Controls what happens when a window is closed by the user or system. GLUT_ACTION_EXIT will immediately exit the application (default). GLUT_ACTION_GLUTMAINLOOP_RETURNS will immediately return from the main loop. GLUT_ACTION_CONTINUE_EXECUTION will contine execution of remaining windows.

  • GLUT_INIT_DISPLAY_MODE
    Set the display mode for new windows.

  • GLUT_INIT_WINDOW_HEIGHT
    Set the initial height of new windows.

  • GLUT_INIT_WINDOW_WIDTH
    Set the initial width of new windows.

  • GLUT_INIT_WINDOW_X
    Set the initial horizontal position of new windows.

  • GLUT_INIT_WINDOW_Y
    Set the initial vertical position of new windows.

  • GLUT_RENDERING_CONTEXT
    Either GLUT_CREATE_NEW_CONTEXT or GUT_USE_CURRENT_CONTEXT to indicate whether to share the current OpenGL rendering context with new windows.

  • GLUT_WINDOW_CURSOR
    Attempt to set the current window's current cursor as if by glutSetCursor().

See also:
glutGet(), glutDeviceGet(), glutGetModifiers(), glutLayerGet(), glutDestroyWindow(), glutMainLoop(), glutInitDisplayMode(), glutInit(), glutInitWindowSize(), glutInitWindowPosition(), glutSetCursor()




OpenGLUT Development @ Sourceforge
Homepage | Summary | Files | CVS | Forums | Lists | Bugs | RFE

Generated on Sat Feb 5 01:47:29 2005 for OpenGLUT by doxygen 1.3.9.1
The OpenGLUT project is hosted by sourceforge.net.