GLUtil-0.10.4: Miscellaneous OpenGL utilities.
Safe HaskellNone
LanguageHaskell2010

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).

Synopsis

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.

Instances

Instances details
HasVariableType Float Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType Int32 Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType Word32 Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType t => HasVariableType [t] Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (M22 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (M33 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (M44 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V4 Int32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V4 Word32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V4 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V3 Int32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V3 Word32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V3 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V2 Int32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V2 Word32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V2 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V1 Int32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V1 Word32) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasVariableType (V1 GLfloat) Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

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.

class Storable a => HasGLType a where Source #

Open mapping from Haskell types to OpenGL types.

Methods

glType :: a -> DataType Source #

Instances

Instances details
HasGLType Float Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasGLType Word8 Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasGLType Word16 Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasGLType Word32 Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping

HasGLType GLint Source # 
Instance details

Defined in Graphics.GLUtil.TypeMapping