Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data NoSupport = NoSupport {}
- checkExtension :: MonadIO m => Text -> Bool -> m ()
- checkExtensionM :: MonadIO m => Text -> Bool -> m a -> m a
- checkOpenGLOrExtensionM :: MonadIO m => OpenGLVersion -> Text -> Bool -> m a -> m a
- checkOpenGLM :: MonadIO m => OpenGLVersion -> m a -> m a
Documentation
Thrown when there was a detected attempt to use an OpenGL feature that is not supported by the driver, hardware or platform.
Caramia cannot detect all attempts to use non-supported features.
If the platform supports at least OpenGL 3.3, then this exception is guaranteed to never be thrown.
NoSupport | The text contains human-readable string that may tell what exactly is missing and where. |
checkExtension :: MonadIO m => Text -> Bool -> m () Source
Checks that extension is available and throw NoSupport
with the given
extension name if it is not.
checkExtensionM :: MonadIO m => Text -> Bool -> m a -> m a Source
Same as checkExtension
but takes an action to run afterwards, it checks
for the extension and then runs the action.
checkOpenGLOrExtensionM :: MonadIO m => OpenGLVersion -> Text -> Bool -> m a -> m a Source
Checks that OpenGL version is at least given version or that an extension is available.
This is for the common case of checking core OpenGL version and falling back to a core extension.
checkOpenGLM :: MonadIO m => OpenGLVersion -> m a -> m a Source