|
|
|
|
|
Description |
A GPipe program mainly consits of creating and manipulating streams of primitives and fragments.
The modules Graphics.GPipe.Stream.Primitive and Graphics.GPipe.Stream.Fragment defines those streams.
All atomic values except textures in streams uses the Vertex or Fragment type constructors.
Composite types are created by composing the atomic Vertex or Fragment types, rather than wrapping the
composite type in any of those type constructors. This module provides the common classes for those atomic types,
as well as reexports of imported common types and modules.
|
|
Synopsis |
|
|
|
|
Common classes
|
|
|
Denotes a type on the GPU, that can be moved there from the CPU (through the internal use of uniforms).
Use the existing instances of this class to create new ones. Note that toGPU should not be strict on its argument.
Its definition should also always use the same series of toGPU calls to convert values of the same type. This unfortunatly
rules out ordinary lists (but instances for fixed length lists from the Vec package are however provided).
| | Associated Types | | | Methods | | Converts a value from the CPU to the GPU.
|
| | Instances | GPU () | GPU (Fragment Bool) | GPU (Fragment Float) | GPU (Fragment Int) | GPU (Vertex Bool) | GPU (Vertex Float) | GPU (Vertex Int) | (GPU a, GPU b) => GPU ((,) a b) | (GPU a, GPU b) => GPU (a :. b) | (GPU a, GPU b, GPU c) => GPU ((,,) a b c) | (GPU a, GPU b, GPU c, GPU d) => GPU ((,,,) a b c d) |
|
|
|
|
This class provides the GPU functions either not found in Prelude's numerical classes, or that has wrong types.
Instances are also provided for normal Floats and Doubles.
Minimal complete definition: floor' and ceiling'.
| | Methods | | | | | | | | | | | | | | | clamp :: a -> a -> a -> a | Source |
| | | | | | | | smoothstep :: a -> a -> a -> a | Source |
|
| | Instances | |
|
|
Reexports
|
|
:. (:.) |
|
Vec2 |
|
Vec3 |
|
Vec4 |
|
module Data.Vec.LinAlg |
|
module Data.Boolean |
|
Produced by Haddock version 2.4.2 |