GPipe-GLFW-1.3.0: GLFW OpenGL context creation for GPipe

Safe HaskellNone
LanguageHaskell2010

Graphics.GPipe.Context.GLFW

Contents

Synopsis

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 WindowHints 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 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.

Constructors

WindowConf 

Fields

defaultWindowConf :: WindowConf Source #

A set of sensible defaults for the WindowConf. Used by newContext.

Re-exported window actions