Copyright | (c) Sven Panne 2002-2018 |
---|---|
License | BSD3 |
Maintainer | Sven Panne <svenpanne@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
GLUT maintains a considerable amount of programmer visible state. Some (but not all) of this state may be directly retrieved.
Synopsis
- windowBorderWidth :: GettableStateVar Int
- windowHeaderHeight :: GettableStateVar Int
- skipStaleMotionEvents :: StateVar Bool
- rgba :: GettableStateVar Bool
- type BufferDepth = Int
- rgbaBufferDepths :: GettableStateVar (BufferDepth, BufferDepth, BufferDepth, BufferDepth)
- colorBufferDepth :: GettableStateVar BufferDepth
- doubleBuffered :: GettableStateVar Bool
- stereo :: GettableStateVar Bool
- accumBufferDepths :: GettableStateVar (BufferDepth, BufferDepth, BufferDepth, BufferDepth)
- depthBufferDepth :: GettableStateVar BufferDepth
- stencilBufferDepth :: GettableStateVar BufferDepth
- type SampleCount = Int
- sampleCount :: GettableStateVar SampleCount
- formatID :: GettableStateVar Int
- fullScreenMode :: StateVar Bool
- geometryVisualizeNormals :: StateVar Bool
- vertexAttribCoord3 :: SettableStateVar (Maybe AttribLocation)
- vertexAttribNormal :: SettableStateVar (Maybe AttribLocation)
- vertexAttribTexCoord2 :: SettableStateVar (Maybe AttribLocation)
- damaged :: Layer -> GettableStateVar Bool
- elapsedTime :: GettableStateVar Int
- screenSize :: GettableStateVar Size
- screenSizeMM :: GettableStateVar Size
- hasKeyboard :: GettableStateVar Bool
- type ButtonCount = Int
- numMouseButtons :: GettableStateVar (Maybe ButtonCount)
- numSpaceballButtons :: GettableStateVar (Maybe ButtonCount)
- type DialCount = Int
- numDialsAndButtons :: GettableStateVar (Maybe (DialCount, ButtonCount))
- numTabletButtons :: GettableStateVar (Maybe ButtonCount)
- type AxisCount = Int
- type PollRate = Int
- joystickInfo :: GettableStateVar (Maybe (ButtonCount, PollRate, AxisCount))
- supportedNumAuxBuffers :: GettableStateVar [Int]
- supportedSamplesPerPixel :: GettableStateVar [SampleCount]
- glutVersion :: GettableStateVar String
- initState :: GettableStateVar Bool
State of all windows
windowBorderWidth :: GettableStateVar Int Source #
(freeglut only) Contains the thickness of the sizing border around the perimeter of a window that can be resized, in pixels.
windowHeaderHeight :: GettableStateVar Int Source #
(freeglut only) Contains the height of the header/caption area of a window in pixels.
skipStaleMotionEvents :: StateVar Bool Source #
(freeglut on X11 only) Controls if all but the last motion event should be discarded.
State of the current window
Framebuffer state
type BufferDepth = Int Source #
Bit depth of a buffer
rgbaBufferDepths :: GettableStateVar (BufferDepth, BufferDepth, BufferDepth, BufferDepth) Source #
Contains the number of red, green, blue, and alpha bits in the color buffer of the current window's current layer (0 in color index mode).
colorBufferDepth :: GettableStateVar BufferDepth Source #
Contains the total number of bits in the color buffer of the /current window's/ current layer. For an RGBA layer, this is the sum of the red, green, blue, and alpha bits. For an color index layer, this is the number of bits of the color indexes.
accumBufferDepths :: GettableStateVar (BufferDepth, BufferDepth, BufferDepth, BufferDepth) Source #
Contains the number of red, green, blue, and alpha bits in the accumulation buffer of the current window's current layer (0 in color index mode).
depthBufferDepth :: GettableStateVar BufferDepth Source #
Contains the number of bits in the depth buffer of the current window's current layer.
stencilBufferDepth :: GettableStateVar BufferDepth Source #
Contains the number of bits in the stencil buffer of the /current window's/ current layer.
type SampleCount = Int Source #
Number of samples for multisampling
sampleCount :: GettableStateVar SampleCount Source #
Contains the number of samples for multisampling for the current window.
formatID :: GettableStateVar Int Source #
Contains the window system dependent format ID for the current layer of the current window. On X11 GLUT implementations, this is the X visual ID. On Win32 GLUT implementations, this is the Win32 Pixel Format Descriptor number. This value is returned for debugging, benchmarking, and testing ease.
Full screen state
Object rendering state
geometryVisualizeNormals :: StateVar Bool Source #
(freeglut only) Controls if vectors representing the normals should be drawn, too, when objects are drawn.
Vertex attribute state
vertexAttribCoord3 :: SettableStateVar (Maybe AttribLocation) Source #
(freeglut only) If vertexAttribCoord3
and vertexAttribNormal
both
contain Nothing
, the fixed function pipeline is used to draw
objects. Otherwise VBOs are used and the coordinates are passed via Just
this attribute location (for a vec3).
vertexAttribNormal :: SettableStateVar (Maybe AttribLocation) Source #
(freeglut only) If vertexAttribCoord3
and vertexAttribNormal
both
contain Nothing
, the fixed function pipeline is used to draw
objects. Otherwise VBOs are used and the normals are passed via Just
this
attribute location (for a vec3).
vertexAttribTexCoord2 :: SettableStateVar (Maybe AttribLocation) Source #
(freeglut only) If VBOs are used to draw objects (controlled via
vertexAttribCoord3
and vertexAttribNormal
), the texture coordinates are
passed via Just
this attribute location (for a vec2).
Layer state
damaged :: Layer -> GettableStateVar Bool Source #
Contains True
if the given plane of the current window has been
damaged (by window system activity) since the last display callback was
triggered. Calling postRedisplay
or
postOverlayRedisplay
will not set this True
.
Timing
elapsedTime :: GettableStateVar Int Source #
Contains the number of milliseconds since
initialize
was called.
Device information
If a device is not available, the following state variables contain
Nothing
, otherwise they return Just
the specific device information.
Only a screen is always assumed.
screenSize :: GettableStateVar Size Source #
The size of the screen in pixels.
screenSizeMM :: GettableStateVar Size Source #
The size of the screen in millimeters.
type ButtonCount = Int Source #
Number of buttons of an input device
supportedNumAuxBuffers :: GettableStateVar [Int] Source #
(freeglut only) Contains a list of the number of auxiliary buffers supported, in increasing order.
supportedSamplesPerPixel :: GettableStateVar [SampleCount] Source #
(freeglut only) Contains a list of the number of samples per pixel supported for multisampling, in increasing order.
GLUT information
glutVersion :: GettableStateVar String Source #
Contains version of GLUT in the form of
flavour major.minor.patchlevel
, where flavour
is one of
GLUT
, freeglut
or OpenGLUT
.
initState :: GettableStateVar Bool Source #
(freeglut only) Contains True
if GLUT has been initialized
with initialize
or
getArgsAndInitialize
has and not yet
been de-initialized with exit
. Contains
False
otherwise.