OpenGLRaw-2.5.0.0: A raw binding for the OpenGL graphics system

Copyright(c) Sven Panne 2015
LicenseBSD3
MaintainerSven Panne <svenpanne@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Graphics.Rendering.OpenGL.Raw.GetProcAddress

Contents

Description

This module offers a portable way to retrieve OpenGL functions and extension entries, providing a portability layer upon platform-specific mechanisms like glXGetProcAddress, wglGetProcAddress or NSAddressOfSymbol.

Synopsis

Unchecked retrieval

getProcAddress :: MonadIO m => String -> m (FunPtr a) Source

Retrieve an OpenGL function by name. Returns nullFunPtr when no function with the given name was found.

getProcAddressWithSuffixes :: MonadIO m => String -> [String] -> m (FunPtr a) Source

Retrieve an OpenGL function by name, trying a list of name suffixes in the given order. Returns nullFunPtr when no function with the given name plus any of the suffixes was found.

getExtension :: MonadIO m => String -> m (FunPtr a) Source

Retrieve an OpenGL function by name, additionally trying a list of all known vendor suffixes. Returns nullFunPtr when no function with the given name plus any of the suffixes was found.

Checked retrieval

getProcAddressChecked :: MonadIO m => String -> m (FunPtr a) Source

Retrieve an OpenGL function by name. Throws an userError when no function with the given name was found.

getProcAddressWithSuffixesChecked :: MonadIO m => String -> [String] -> m (FunPtr a) Source

Retrieve an OpenGL function by name, trying a list of name suffixes in the given order. Throws an userError when no function with the given name plus any of the suffixes was found.

getExtensionChecked :: MonadIO m => String -> m (FunPtr a) Source

Retrieve an OpenGL function by name, additionally trying a list of all known vendor suffixes. Throws an userError when no function with the given name plus any of the suffixes was found.