| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Rendering.Ombra.Shader.CPU
- data CPUSetterType k
- type family CPU (s :: CPUSetterType *) g where ...
- type family CPUBase g
- type family CPUMirror g
- class BaseUniform g where
- class ShaderType g => BaseAttribute g where
- class Generic g => Uniform s g where
- class Generic g => Attribute s g where
- toGPUBool :: Bool -> Int32
- single :: Proxy S
- mirror :: Proxy M
Documentation
data CPUSetterType k #
This kind represents the way you are setting a GPU value.
type family CPU (s :: CPUSetterType *) g where ... #
Instances
| type CPUBase Mat4 # | |
| type CPUBase Mat3 # | |
| type CPUBase Mat2 # | |
| type CPUBase BVec4 # | |
| type CPUBase BVec3 # | |
| type CPUBase BVec2 # | |
| type CPUBase IVec4 # | |
| type CPUBase IVec3 # | |
| type CPUBase IVec2 # | |
| type CPUBase Vec4 # | |
| type CPUBase Vec3 # | |
| type CPUBase Vec2 # | |
| type CPUBase SamplerCube # | |
| type CPUBase Sampler2D # | |
| type CPUBase Int # | |
| type CPUBase Float # | |
| type CPUBase Bool # | |
| type CPUBase (Array n BVec4) # | |
| type CPUBase (Array n BVec3) # | |
| type CPUBase (Array n BVec2) # | |
| type CPUBase (Array n IVec4) # | |
| type CPUBase (Array n IVec3) # | |
| type CPUBase (Array n IVec2) # | |
| type CPUBase (Array n Vec4) # | |
| type CPUBase (Array n Vec3) # | |
| type CPUBase (Array n Vec2) # | |
| type CPUBase (Array n Int) # | |
| type CPUBase (Array n Bool) # | |
| type CPUBase (Array n Float) # | |
The mirror type of a certain global.
For instance:
data T = T Vec3 Float -- In the shader module
data T = T Vec3 Float -- CPU version of the uniform type
type CPUMirror GPU.T = T
class BaseUniform g where #
CPU types convertible to GPU types (as uniforms).
Minimal complete definition
Methods
setUniform :: UniformLocation -> proxy g -> CPUBase g -> GL () #
Instances
| GLES => BaseUniform Mat4 # | |
| GLES => BaseUniform Mat3 # | |
| GLES => BaseUniform Mat2 # | |
| GLES => BaseUniform BVec4 # | |
| GLES => BaseUniform BVec3 # | |
| GLES => BaseUniform BVec2 # | |
| GLES => BaseUniform IVec4 # | |
| GLES => BaseUniform IVec3 # | |
| GLES => BaseUniform IVec2 # | |
| GLES => BaseUniform Vec4 # | |
| GLES => BaseUniform Vec3 # | |
| GLES => BaseUniform Vec2 # | |
| GLES => BaseUniform SamplerCube # | |
| GLES => BaseUniform Sampler2D # | |
| GLES => BaseUniform Int # | |
| GLES => BaseUniform Float # | |
| GLES => BaseUniform Bool # | |
| GLES => BaseUniform (Array n BVec4) # | |
| GLES => BaseUniform (Array n BVec3) # | |
| GLES => BaseUniform (Array n BVec2) # | |
| GLES => BaseUniform (Array n IVec4) # | |
| GLES => BaseUniform (Array n IVec3) # | |
| GLES => BaseUniform (Array n IVec2) # | |
| GLES => BaseUniform (Array n Vec4) # | |
| GLES => BaseUniform (Array n Vec3) # | |
| GLES => BaseUniform (Array n Vec2) # | |
| GLES => BaseUniform (Array n Int) # | |
| GLES => BaseUniform (Array n Bool) # | |
| GLES => BaseUniform (Array n Float) # | |
class ShaderType g => BaseAttribute g where #
CPU types convertible to GPU types (as attributes).
Minimal complete definition
Methods
encodeAttribute :: proxy g -> [CPUBase g] -> GL AnyArray #
setAttribute :: proxy g -> GLUInt -> GL () #
Instances
| GLES => BaseAttribute BVec4 # | |
| GLES => BaseAttribute BVec3 # | |
| GLES => BaseAttribute BVec2 # | |
| GLES => BaseAttribute IVec4 # | |
| GLES => BaseAttribute IVec3 # | |
| GLES => BaseAttribute IVec2 # | |
| GLES => BaseAttribute Vec4 # | |
| GLES => BaseAttribute Vec3 # | |
| GLES => BaseAttribute Vec2 # | |
| GLES => BaseAttribute Int # | |
| GLES => BaseAttribute Float # | |
| GLES => BaseAttribute Bool # | |
class Generic g => Uniform s g where #
Minimal complete definition
Methods
withUniforms :: Applicative f => proxy s -> g -> CPU s g -> (forall g. BaseUniform g => Int -> Proxy g -> CPUBase g -> f ()) -> f () #
class Generic g => Attribute s g where #
Minimal complete definition
Methods
withAttributes :: Applicative f => proxy s -> g -> [CPU s g] -> (forall g. BaseAttribute g => Int -> Proxy g -> [CPUBase g] -> f ()) -> f () #