Safe Haskell | None |
---|
Graphics.GLUtil.TypeMapping
Description
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).
- class HasVariableType a where
- variableType :: a -> VariableType
- variableDataType :: VariableType -> DataType
- class Storable a => HasGLType a where
Documentation
class HasVariableType a whereSource
Methods
variableType :: a -> VariableTypeSource
Instances
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.