Portability | portable |
---|---|
Stability | stable |
Maintainer | Sven Panne <[email protected]> |
Safe Haskell | Safe-Inferred |
Graphics.Rendering.OpenGL.GL.ObjectName
Description
This module corresponds to section 2.5 (Objects and the Object Model) of the OpenGL 4.4 specs.
Object names are explicitly handled identifiers for API objects, e.g. a texture object name in OpenGL or a buffer object name in OpenAL.
- class ObjectName a where
- isObjectName :: a -> IO Bool
- deleteObjectName :: a -> IO ()
- deleteObjectNames :: [a] -> IO ()
- class ObjectName a => GeneratableObjectName a where
- genObjectName :: IO a
- genObjectNames :: Int -> IO [a]
Documentation
class ObjectName a whereSource
An ObjectName
is an explicitly handled identifier for API objects, e.g. a
texture object name in OpenGL or a buffer object name in OpenAL.
Minimal complete definition: isObjectName
plus one of deleteObjectName
or
deleteObjectNames
.
Methods
isObjectName :: a -> IO BoolSource
Test if the given object name is currently in use, i.e. test if it has been generated, but not been deleted so far.
deleteObjectName :: a -> IO ()Source
Make the given object name available again, declaring it as unused.
deleteObjectNames :: [a] -> IO ()Source
Bulk version of deleteObjectName
.
class ObjectName a => GeneratableObjectName a whereSource
A GeneratableObjectName
is an ObjectName
which can be generated without
creating an associated object at the same time, e.g. a buffer object name.
Note that e.g. program object names do not fall into this category, because
you can only create such a name together with a program object itself.
Minimal complete definition: One of genObjectName
or genObjectNames
.
Methods
genObjectName :: IO aSource
Generate a new unused object name. By generating the name, it becomes used.
genObjectNames :: Int -> IO [a]Source
Bulk version of genObjectName
.