Copyright | (c) 2015 Brian W Bush |
---|---|
License | MIT |
Maintainer | Brian W Bush <consult@brianwbush.info> |
Stability | Stable |
Portability | Portable |
Safe Haskell | None |
Language | Haskell2010 |
Functions for setting up GLUT applications.
- data Setup a = Setup {
- stereo :: Stereo
- switchEyes :: Bool
- viewer :: Either (ViewerParameters a) Viewer
- fullscreen :: Bool
- data Stereo
- = DLP
- | QuadBuffer
- | Cardboard
- | Mono
- data Viewer
- setup :: (AdditiveGroup a, MatrixComponent a, RealFloat a, Storable a) => String -> String -> [String] -> Setup a -> IO (DlpEncoding, ViewerParameters a, [String])
- handleArguments :: [String] -> (Setup a, [String])
- idle :: IdleCallback
Functions
The configuration for setting up the display.
Setup | |
|
Functor Setup Source | |
Eq a => Eq (Setup a) Source | |
Data a => Data (Setup a) Source | |
Read a => Read (Setup a) Source | |
Show a => Show (Setup a) Source | |
Generic (Setup a) Source | |
(Generic a, FromJSON a) => FromJSON (Setup a) Source | |
(Generic a, Binary a) => Binary (Setup a) Source | |
Default (Setup a) Source | |
type Rep (Setup a) Source |
The type of stereo.
DLP | Frame-sequential DLP 3D ReadySync stereo. |
QuadBuffer | Quad buffer stereo. |
Cardboard | Google Cardboard stereo. |
Mono | No stereo. |
The viewer information.
:: (AdditiveGroup a, MatrixComponent a, RealFloat a, Storable a) | |
=> String | The window title. |
-> String | The program name. |
-> [String] | The X11 arguments. |
-> Setup a | The setup configuration. |
-> IO (DlpEncoding, ViewerParameters a, [String]) | An action returing the DLP encoding requested, the viewer parameters, and the uninterpretted arguments. |
Set up a window with basic callbacks. This creates a double-buffered window with a depth buffer, a transparency blending function, a generic reshaping callback, and a redisplaying idle function. See handleArguments
for information on how command-line arguments are interpretted.
:: [String] | The arguments. |
-> (Setup a, [String]) | The setup configuration and the remaining, uninterpretted, arguments. |
Act on command-line arguments.
- "--dlp" puts the application in frame-sequential DLP (3D ReadySync) stereo mode.
- "--quadbuffer" puts the application in quad-buffer stereo mode.
- "--cardboard" puts the application in side-by-side (Google Cardboard) stereo mode.
- "--switchEyes" swaps the views of the left and right eyes.
- "--phone" sets the frustum for a typical smartphone.
- "--laptop" sets the frustum for a typical laptop.
- "--desktop" sets the frustum for a typical desktop monitor.
- "--projection" sets the frustum for a typical projector.
- "--fullscreen" puts the application in full screen mode.
An idle callback that simply posts a request for redisplay.