Copyright | (c) Sven Panne 2015 |
---|---|
License | BSD3 |
Maintainer | Sven Panne <[email protected]> |
Stability | stable |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Graphics.Rendering.OpenGL.Raw.GetProcAddress
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
.
- getProcAddress :: String -> IO (FunPtr a)
- getProcAddressWithSuffixes :: String -> [String] -> IO (FunPtr a)
- getExtension :: String -> IO (FunPtr a)
- getProcAddressChecked :: String -> IO (FunPtr a)
- getProcAddressWithSuffixesChecked :: String -> [String] -> IO (FunPtr a)
- getExtensionChecked :: String -> IO (FunPtr a)
Unchecked retrieval
getProcAddress :: String -> IO (FunPtr a) Source
Retrieve an OpenGL function by name. Returns nullFunPtr
when no function
with the given name was found.
getProcAddressWithSuffixes :: String -> [String] -> IO (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 :: String -> IO (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 :: String -> IO (FunPtr a) Source
Retrieve an OpenGL function by name. Throws an userError
when no function
with the given name was found.