GPipe-GLFW- GLFW OpenGL context creation for GPipe

Safe HaskellNone




Window manipulation functions covering much of the GLFW Window guide: 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.


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