GLUtil-0.6.3: Miscellaneous OpenGL utilities.

Safe HaskellNone



This module contains classes and functions to relate Haskell types with OpenGL DataTypes (typically used to describe the values stored in arrays) and VariableTypes (used as attributes and uniforms in GLSL programs).



variableDataType :: VariableType -> DataTypeSource

Maps each VariableType to its corresponding DataType. Typically this indicates the element type of composite variable types (e.g. variableDataType FloatVec2 = Float). Note that this is a partial mapping as we are primarily supporting the use of these types as inputs to GLSL programs where types such as Bool are not supported.

class Storable a => HasGLType a whereSource

Open mapping from Haskell types to OpenGL types.


glType :: a -> DataTypeSource