HGE2D-0.1.6.2: 2D game engine written in Haskell

Copyright(c) 2016 Martin Buck
Licensesee LICENSE
Safe HaskellNone
LanguageHaskell2010

HGE2D.Engine

Description

Containing functions for the engine, mostly to interact with GLUT and OpenGL

Synopsis

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