ContentsIndex
Graphics.Plot.State
Description
Defines the structure used to store the display state.
Synopsis
data DisplayState = DisplayState {
stateDebug :: Bool
stateAnimate :: Bool
stateAnimateStart :: Bool
stateAnimateTime :: Int
stateWindowSize :: (Float, Float)
stateShowOverlay :: Bool
stateDisplayTime :: Int
stateDisplayTimeLast :: Int
stateDisplayTimeClamp :: Int
stateGateTimeStart :: Int
stateGateTimeEnd :: Int
stateRenderColor :: Bool
stateRenderWireframe :: Bool
stateRenderBlendAlpha :: Bool
stateRenderLineSmooth :: Bool
stateViewScale :: Float
stateViewTranslate :: (Float, Float)
stateViewRotate :: Float
stateViewScaleStep :: Float
stateViewRotateFactor :: Float
stateViewTranslateMark :: (Maybe (Int, Int))
stateViewRotateMark :: (Maybe (Int, Int))
stateImages :: (Map String Image)
stateTextures :: (Map String Texture)
}
displayStateInit :: DisplayState
type Image = (Int, Int, Ptr Word8)
type Texture = (Image, TextureObject)
Documentation
data DisplayState
Constructors
DisplayState
stateDebug :: BoolSet this to True to emit lots of debugging info.
stateAnimate :: BoolWhether to call the user's draw repetedly to get an animation.
stateAnimateStart :: BoolWhether this is the first frame of the animation.
stateAnimateTime :: IntNumber of msec the animation has been running for
stateWindowSize :: (Float, Float)The size of the current window.
stateShowOverlay :: BoolWhether the overlay is being displayed.
stateDisplayTime :: IntThe time when we entered the display callback for the current frame.
stateDisplayTimeLast :: Int
stateDisplayTimeClamp :: IntClamp the minimum time between frames to this value (in msec) Most LCD monitors refresh at around 50Hz so setting this to < 20msec probably isn't worthwhile.
stateGateTimeStart :: IntThe time when the last call to the users render function finished.
stateGateTimeEnd :: IntThe time when displayInWindow last finished (after sleeping to clamp fps).
stateRenderColor :: BoolWhether to use colors.
stateRenderWireframe :: BoolWhether to draw wireframes only.
stateRenderBlendAlpha :: BoolWhether to use blending.
stateRenderLineSmooth :: BoolWhether to use line smoothing.
stateViewScale :: FloatThe world is scaled by this factor in both x and y directions.
stateViewTranslate :: (Float, Float)The world is translated by this vector.
stateViewRotate :: FloatThe world is rotated by this vector, in degrees.
stateViewScaleStep :: FloatHow much to scale the world by for each step of the mouse wheel.
stateViewRotateFactor :: FloatHow many degrees to rotate the world by for each pixel of x motion.
stateViewTranslateMark :: (Maybe (Int, Int))During viewport translation, where the mouse was clicked on the window.
stateViewRotateMark :: (Maybe (Int, Int))During viewport rotation, where the mouse was clicked on the window
stateImages :: (Map String Image)Cache of loaded images.
stateTextures :: (Map String Texture)Cache of loaded textures. If there is an entry here then there will also be a corresponding entry in stateImages.
displayStateInit :: DisplayState
The initial display state.
type Image = (Int, Int, Ptr Word8)

Internal representation of an image.

(width, height, image data in uncompressed 32bit RGBA format).

type Texture = (Image, TextureObject)

Internal representation of a texture.

(image holding this texture, OpenGL texture object/handle).

Produced by Haddock version 0.7