HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

ModuleOpenGLRaw-3.3.4.1Haskell2010

Graphics.GL.GetProcAddress

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.

Note that finding an OpenGL entry point doesn't mean that it's actually usable: On most platforms entry points are context-independent, so you have to check the available extensions and/or OpenGL version, too.

  • 10 values
  • PackageOpenGLRaw-3.3.4.1
  • Exports10
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceGetProcAddress.hs

Unchecked retrieval

3 declarations
valuegetExtension :: MonadIO m => String -> m (FunPtr a)
#

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

3 declarations
valuegetExtensionChecked :: MonadIO m => String -> m (FunPtr a)
#

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.

Version info and extensions

4 declarations
valuegetVersion :: MonadIO m => m (Int, Int)
#

Retrieve the OpenGL version, split into major and minor version numbers.

valueversion :: (Int, Int)
#

The OpenGL version, split into major and minor version numbers. Note that in the presence of multiple contexts with different capabilities, this might be wrong. Use getVersion in those cases instead.

valueextensions :: Set String
#

The set of all available OpenGL extensions. Note that in the presence of multiple contexts with different capabilities, this might be wrong. Use getExtensions in those cases instead.