caramia-0.7.2.2: High-level OpenGL bindings

Safe HaskellNone
LanguageHaskell2010

Graphics.Caramia.Internal.Exception

Synopsis

Documentation

data NoSupport Source

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.

Constructors

NoSupport

The text contains human-readable string that may tell what exactly is missing and where.

Fields

info :: Text
 

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.