OpenGLRaw-2.1.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 :: 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.

getProcAddressWithSuffixesChecked :: String -> [String] -> IO (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 :: String -> IO (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.