Copyright | (c) 2016 Martin Buck |
---|---|
License | see LICENSE |
Safe Haskell | None |
Language | Haskell2010 |
Containing functions for the engine, mostly to interact with GLUT and OpenGL
- runEngine :: EngineState a -> a -> IO ()
- display :: EngineState a -> MVar a -> IO ()
- reshape :: EngineState a -> MVar a -> Size -> IO ()
- mouseGrab :: EngineState a -> MVar a -> Position -> IO ()
- mouseHover :: EngineState a -> MVar a -> Position -> IO ()
- keyboardMouse :: EngineState a -> MVar a -> Key -> KeyState -> Modifiers -> Position -> IO ()
- mouseDown :: EngineState a -> MVar a -> GLint -> GLint -> IO ()
- mouseUp :: EngineState a -> MVar a -> GLint -> GLint -> IO ()
- keyDown :: EngineState a -> MVar a -> GLint -> GLint -> Char -> IO ()
- keyUp :: EngineState a -> MVar a -> GLint -> GLint -> Char -> IO ()
- idle :: EngineState a -> MVar a -> IdleCallback
Documentation
runEngine :: EngineState a -> a -> IO () Source #
Main function to run the engine
display :: EngineState a -> MVar a -> IO () Source #
Function to render the current state of the engine
reshape :: EngineState a -> MVar a -> Size -> IO () Source #
Function to react to changes of the window size
mouseGrab :: EngineState a -> MVar a -> Position -> IO () Source #
Mouse grab interactions with the engine
mouseHover :: EngineState a -> MVar a -> Position -> IO () Source #
Mouse hover interactions with the engine
keyboardMouse :: EngineState a -> MVar a -> Key -> KeyState -> Modifiers -> Position -> IO () Source #
Keyboard and mouse interactions with the engine
mouseDown :: EngineState a -> MVar a -> GLint -> GLint -> IO () Source #
MouseDown interaction with the engine
mouseUp :: EngineState a -> MVar a -> GLint -> GLint -> IO () Source #
MouseUp interaction with the engine
keyDown :: EngineState a -> MVar a -> GLint -> GLint -> Char -> IO () Source #
KeyPress interaction with the engine
keyUp :: EngineState a -> MVar a -> GLint -> GLint -> Char -> IO () Source #
KeyRelease interaction with the engine
idle :: EngineState a -> MVar a -> IdleCallback Source #
Idle function of the engine. Used to e.g. apply changes in time to the game state