Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newContext :: ContextFactory c ds GLFWWindow
- newContext' :: [WindowHint] -> WindowConf -> ContextFactory c ds GLFWWindow
- data BadWindowHintsException = BadWindowHintsException [WindowHint]
- data GLFWWindow
- data WindowConf = WindowConf {}
- defaultWindowConf :: WindowConf
Creating contexts
newContext :: ContextFactory c ds GLFWWindow Source
The context factory which facilitates use of GLFW with GPipe. This has to be run from the main thread.
newContext' :: [WindowHint] -> WindowConf -> ContextFactory c ds GLFWWindow Source
The context factory which facilitates use of GLFW with GPipe. This has to be run from the main thread.
Accepts two extra parameters compared to newContext
: a list of GLFW
WindowHint
s and a WindowConf
which determines the width, height and title
of the window.
Throws a BadWindowHintsException
if you use hints that need to be
controlled by this library. Disallowed hints are:
WindowHint'sRGBCapable WindowHint'Visible WindowHint'RedBits WindowHint'GreenBits WindowHint'BlueBits WindowHint'AlphaBits WindowHint'DepthBits WindowHint'StencilBits WindowHint'ContextVersionMajor WindowHint'ContextVersionMinor WindowHint'OpenGLForwardCompat WindowHint'OpenGLProfile
Data types
data BadWindowHintsException Source
An exception which is thrown when you try to use WindowHint
s that need to
be controlled by this library. Contains a list of the offending hints.
data GLFWWindow Source
A value representing a GLFW OpenGL context window.
data WindowConf Source
Initial window size and title suggestions for GLFW. The window will usually be set to the given size with the given title, unless the window manager overrides this.
defaultWindowConf :: WindowConf Source
A set of sensible defaults for the WindowConf
. Used by
newContext
.