| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Rendering.Ombra.Geometry
Contents
- data AttrList is where
- data Geometry is = Geometry (AttrList is) [Word16] Int
- type Geometry2D = '[Position2, UV]
- type Geometry3D = '[Position3, UV, Normal3]
- data GPUBufferGeometry = GPUBufferGeometry {
- attributeBuffers :: [(Buffer, GLUInt, GLUInt -> GL ())]
- elementBuffer :: Buffer
- elementCount :: Int
- geometryHash :: Int
- data GPUVAOGeometry = GPUVAOGeometry {}
- extend :: (Attribute S i, Hashable (CPU S i), ShaderType i, GLES) => (a -> i) -> [CPU S i] -> Geometry is -> Geometry (i ': is)
- remove :: (RemoveAttr i is is', GLES) => (a -> i) -> Geometry is -> Geometry is'
- withGPUBufferGeometry :: GLES => GPUBufferGeometry -> (Int -> [Buffer] -> GL a) -> GL a
- mkGeometry :: GLES => AttrList is -> [Word16] -> Geometry is
- mkGeometry2D :: GLES => [Vec2] -> [Vec2] -> [Word16] -> Geometry Geometry2D
- mkGeometry3D :: GLES => [Vec3] -> [Vec2] -> [Vec3] -> [Word16] -> Geometry Geometry3D
- castGeometry :: Geometry is -> Geometry is'
Documentation
data AttrList is where Source #
A heterogeneous list of attributes.
A set of attributes and indices.
type Geometry2D = '[Position2, UV] Source #
A 2D geometry.
data GPUBufferGeometry Source #
Constructors
| GPUBufferGeometry | |
Fields
| |
Instances
data GPUVAOGeometry Source #
Constructors
| GPUVAOGeometry | |
Fields
| |
Arguments
| :: (Attribute S i, Hashable (CPU S i), ShaderType i, GLES) | |
| => (a -> i) | Attribute constructor (or any other function with that type). |
| -> [CPU S i] | List of values |
| -> Geometry is | |
| -> Geometry (i ': is) |
Add an attribute to a geometry.
Arguments
| :: (RemoveAttr i is is', GLES) | |
| => (a -> i) | Attribute constructor (or any other function with that type). |
| -> Geometry is | |
| -> Geometry is' |
Remove an attribute from a geometry.
withGPUBufferGeometry :: GLES => GPUBufferGeometry -> (Int -> [Buffer] -> GL a) -> GL a Source #
Arguments
| :: GLES | |
| => [Vec2] | List of vertices. |
| -> [Vec2] | List of UV coordinates. |
| -> [Word16] | Triangles expressed as triples of indices to the two lists above. |
| -> Geometry Geometry2D |
Create a 2D Geometry. The first two lists should have the same length.
Arguments
| :: GLES | |
| => [Vec3] | List of vertices. |
| -> [Vec2] | List of UV coordinates. |
| -> [Vec3] | List of normals. |
| -> [Word16] | Triangles expressed as triples of indices to the three lists above. |
| -> Geometry Geometry3D |
Create a 3D Geometry. The first three lists should have the same length.
castGeometry :: Geometry is -> Geometry is' Source #