handa-opengl-0.1.6.1: Utility functions for OpenGL and GLUT

Copyright(c) 2015 Brian W Bush
LicenseMIT
MaintainerBrian W Bush <consult@brianwbush.info>
StabilityStable
PortabilityPortable
Safe HaskellNone
LanguageHaskell2010

Graphics.UI.Handa.Setup

Contents

Description

Functions for setting up GLUT applications.

Synopsis

Functions

setup Source #

Arguments

:: String

The window title.

-> IO (DlpEncoding, ViewerParameters, [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.

handleArguments :: [String] -> IO (DlpEncoding, ViewerParameters, [String]) Source #

Act on command-line arguments.

  • "--fullscreen" puts the application in full screen mode.
  • "--stereo" puts the application in frame-sequential DLP stereo mode.
  • "--cardboard" puts the application in side-by-side (Google Cardboard) stereo mode.
  • "--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.
  • "--projection1 sets the frustum for a typical projector.
  • "--switchEyes" swaps the views of the left and right eyes.

idle :: IdleCallback Source #

An idle callback that simply posts a request for redisplay.