Safe Haskell | None |
---|---|
Language | Haskell2010 |
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).
Synopsis
- class HasVariableType a where
- variableType :: a -> VariableType
- variableDataType :: VariableType -> DataType
- class Storable a => HasGLType a where
Documentation
class HasVariableType a where Source #
A mapping from Haskell types to values of VariableType
. This
defines how Haskell values may be mapped to values that may be
bound to GLSL variables.
variableType :: a -> VariableType Source #
Instances
variableDataType :: VariableType -> DataType Source #
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.