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

Safe HaskellNone
LanguageHaskell2010

Graphics.GPipe.Context.GLFW.Window

Contents

Description

Window manipulation functions covering much of the GLFW Window guide: http://www.glfw.org/docs/latest/window_guide.html. Notably absent are the window creation functions. These are handled automatically by GPipe-GLFW.

Actions are in the GPipe ContextT monad when a window handle is required, otherwise they are bare reexported IO actions which can be lifted into the ContextT monad. The Window taken by many of these functions is the window resource from GPipe.

Synopsis

Window objects

Window event processing

GLFW event processing is performed by 'GPipe-GLFW' after each call to the GPipe swapBuffers. No further action is required, but additional controls are available for complex applications in Graphics.GPipe.Context.GLFW.

Window properties and events

Window closing and close flag

setWindowCloseCallback :: MonadIO m => Window os c ds -> Maybe (IO ()) -> ContextT Handle os m (Maybe ()) Source #

Window size

Framebuffer size

Reexported from Graphics.GPipe.Context.

getFrameBufferSize :: (ContextHandler ctx, MonadIO m) => Window os c ds -> ContextT ctx os m (V2 Int) #

Return the current size of the context frame buffer. This is needed to set viewport size and to get the aspect ratio to calculate projection matrices.

Buffer swapping

Buffer swapping is initiated via the GPipe swapBuffers function.

Not supported

Some GLFW functionality isn't currently exposed by Graphics.UI.GLFW.

  • glfwSetWindowUserPointer, glfwGetWindowUserPointer