Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Documentation
class OpenGLResource innertype a | a -> innertype where Source
All OpenGL resources implement this typeclass.
The resources have an inner type, usually a GLuint
but not always.
If you work with raw OpenGL resources, you may need to use touch
to make
sure the resource is not garbage collected prematurely.
getRaw :: MonadIO m => a -> m innertype Source
Returns the raw OpenGL type.
touch :: MonadIO m => a -> m () Source
Guarantees that the resource has not been garbage collected at the point this function is invoked.
finalize :: MonadIO m => a -> m () Source
Promptly finalizes the resource.
This can be unsafe; see finalizeNow
.
OpenGLResource GLsync Fence Source | |
OpenGLResource GLuint Buffer Source | |
OpenGLResource GLuint Texture Source | If you use |
OpenGLResource GLuint Framebuffer Source | |
OpenGLResource GLuint Pipeline Source | Despite the Haskell name, |
OpenGLResource GLuint Shader Source | |
OpenGLResource GLuint VAO Source | |
OpenGLResource a (WrappedOpenGLResource a) Source | |
OpenGLResource GLuint (Query a) Source |