OpenGL-2.10.0.1: A binding for the OpenGL graphics system

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

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. They come in two flavors: If a name can exist on its own without an associated object, we have a GeneratableObjectName, otherwise we have an ObjectName.

Synopsis

Documentation

class ObjectName a where Source

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, (deleteObjectName | deleteObjectNames)

Methods

isObjectName :: a -> IO Bool Source

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 where Source

A GeneratableObjectName is an ObjectName which can be generated without creating an associated object at the same time, e.g. an OpenGL buffer object name. Note that e.g. OpenGL 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

genObjectName | genObjectNames

Methods

genObjectName :: IO a Source

Generate a new unused object name. By generating the name, it becomes used.

genObjectNames :: Int -> IO [a] Source

Bulk version of genObjectName.