UNTITLED LOCAL UNTITLED
NAME
glutGet -- Allows you to query some general state/option variables.
LIBRARY
OpenGLUT - state
SYNOPSIS
#include <openglut.h>
int
glutGet(GLenum eWhat);
PARAMETERS
eWhat Enumerated parameter ID.
DESCRIPTION
This function permits you to query for the current value of many different OpenGLUT state variables. The current list is:
- GLUT_ACTION_ON_WINDOW_CLOSE
Allows you to do something other than die if the user closes one of your windows.
- 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
Allows you to specify context-sharing when you open new windows.
- GLUT_SCREEN_HEIGHT
- GLUT_SCREEN_HEIGHT_MM
Height in millimeters.
- GLUT_SCREEN_WIDTH
- GLUT_SCREEN_WIDTH_MM
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
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.
SEE ALSO glutSetOption(3)glutDeviceGet(3)glutGetModifiers(3)glutLayerGet(3)
Epoch
Check Out this Related Man Page
UNTITLED LOCAL UNTITLED
NAME
glutCreateSubWindow -- Create a subwindow
LIBRARY
OpenGLUT - window
SYNOPSIS
#include <openglut.h>
int
glutCreateSubWindow(int parentID, int x, int y, int w, int h);
PARAMETERS
parentID Parent window identifier
x Horizontal position of subwindow
y Vertical position of subwindow
w Width of subwindow
h Height of subwindow
DESCRIPTION
In almost every regard that is important to you, a subwindow is like a top-level window. It has a window id; it has its own set of event
callbacks; you can render to it; you are notified of its creation; ...
A subwindow lives inside of some other window (possibly a top-level window, possibly another subwindow). Because of this, it generally only
interacts with other windows of your own creation, hence it is not subjected to a window manager. This is the primary source for its differ-
ences from a top-level window:
- There are no borders or decorations.
- There is no title bar, hence no title.
- Requests tend to be acted on a little more directly, without interference from a window manager.
- The subwindow inherits the display mode of its parent.
Like a top-level window, you must register a display callback function if you wish to use glutMainloop().
A notable case where this function can fail is for offscreen windows. A coherent concept of a subwindow of an offscreen window would intro-
duce more complication than is presently believed to be worthwhile. Attempting such a window presently just fails. Failure is denoted by a
0 window id being returned.
Subwindows can be very useful for partitioning a window into GUI elements: They have their own input callbacks, so you don't have to figure
out which window an event is for. Graphics are clipped to the boundaries of your subwindows, so you do not need to worry much about where
your drawing goes. Because windows and subwindows work almost identically from the perspective of a GLUT program, it is relatively easy to
move a cluster of related controls into a separate top-level window---or, conversely, embed what was a top-level window inside of another
window. OpenGLUT can also report some basic statistics about your (sub)window, relieving you of the duty of tracking all of that information
for yourself.
SEE ALSO glutCreateWindow(3)glutDestroyWindow(3)glutCreateMenuWindow(3)
Epoch