| OpenGL-2.2.3.0: A binding for the OpenGL graphics system | Contents | Index

Graphics.Rendering.OpenGL.GL.Evaluators

Portability | portable
Stability | stable
Maintainer | sven.panne@aedion.de

Contents

Evaluator-related Types
Defining Evaluator Maps
  One-dimensional Evaluator Maps
  Two-dimensional Evaluator Maps
Using Evaluator Maps
  Evaluating an Arbitrary Coordinate Value
  Using Evenly Spaced Coordinate Values
    Defining a Grid
    Evaluating a Whole Mesh
    Evaluating a Single Point on a Mesh
Normal Generation

Description
This module corresponds to section 5.1 (Evaluators) of the OpenGL 2.1 specs.
Synopsis

type Order = GLint
maxOrder :: GettableStateVar Order
class Storable d => Domain d where

evalCoord1 :: d -> IO ()
evalCoord1v :: Ptr d -> IO ()
evalCoord2 :: (d, d) -> IO ()
evalCoord2v :: Ptr d -> IO ()

data Domain d => MapDescriptor d = MapDescriptor (d, d) Stride Order NumComponents
class ControlPoint c
class Map1 m where

withNewMap1 :: (ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d)
withMap1 :: (ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> Ptr d -> IO a) -> IO a
newMap1 :: (ControlPoint c, Domain d) => (d, d) -> [c d] -> IO (m c d)
getMap1Components :: (ControlPoint c, Domain d) => m c d -> IO ((d, d), [c d])

data (ControlPoint c, Domain d) => GLmap1 c d
map1 :: (Map1 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d))
class Map2 m where

withNewMap2 :: (ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d)
withMap2 :: (ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> IO a) -> IO a
newMap2 :: (ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> IO (m c d)
getMap2Components :: (ControlPoint c, Domain d) => m c d -> IO ((d, d), (d, d), [[c d]])

data (ControlPoint c, Domain d) => GLmap2 c d
map2 :: (Map2 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d))
mapGrid1 :: Domain d => StateVar (GLint, (d, d))
mapGrid2 :: Domain d => StateVar ((GLint, (d, d)), (GLint, (d, d)))
evalMesh1 :: PolygonMode -> (GLint, GLint) -> IO ()
evalMesh2 :: PolygonMode -> (GLint, GLint) -> (GLint, GLint) -> IO ()
evalPoint1 :: GLint -> IO ()
evalPoint2 :: (GLint, GLint) -> IO ()
autoNormal :: StateVar Capability

Evaluator-related Types
type Order = GLint
maxOrder :: GettableStateVar Order
class Storable d => Domain d where

Methods

evalCoord1 :: d -> IO ()
evalCoord1v :: Ptr d -> IO ()
evalCoord2 :: (d, d) -> IO ()
evalCoord2v :: Ptr d -> IO ()

Instances

Domain Double |
Domain Float |

data Domain d => MapDescriptor d

Constructors

MapDescriptor (d, d) Stride Order NumComponents |

Instances

(Eq d, Domain d) => Eq (MapDescriptor d) |
(Ord d, Domain d) => Ord (MapDescriptor d) |
(Show d, Domain d) => Show (MapDescriptor d) |

class ControlPoint c

Instances

ControlPoint Vertex4 |
ControlPoint Vertex3 |
ControlPoint Index1 |
ControlPoint Color4 |
ControlPoint Normal3 |
ControlPoint TexCoord4 |
ControlPoint TexCoord3 |
ControlPoint TexCoord2 |
ControlPoint TexCoord1 |

Defining Evaluator Maps
One-dimensional Evaluator Maps
class Map1 m where

Methods

withNewMap1 :: (ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d)
withMap1 :: (ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> Ptr d -> IO a) -> IO a
newMap1 :: (ControlPoint c, Domain d) => (d, d) -> [c d] -> IO (m c d)
getMap1Components :: (ControlPoint c, Domain d) => m c d -> IO ((d, d), [c d])

Instances

Map1 GLmap1 |

data (ControlPoint c, Domain d) => GLmap1 c d

Instances

Map1 GLmap1 |
(Eq d, Domain d, ControlPoint c) => Eq (GLmap1 c d) |
(Ord d, Domain d, ControlPoint c) => Ord (GLmap1 c d) |
(Show d, Domain d, ControlPoint c) => Show (GLmap1 c d) |

map1 :: (Map1 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d))
Two-dimensional Evaluator Maps
class Map2 m where

Methods

withNewMap2 :: (ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d)
withMap2 :: (ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> IO a) -> IO a
newMap2 :: (ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> IO (m c d)
getMap2Components :: (ControlPoint c, Domain d) => m c d -> IO ((d, d), (d, d), [[c d]])

Instances

Map2 GLmap2 |

data (ControlPoint c, Domain d) => GLmap2 c d

Instances

Map2 GLmap2 |
(Eq d, Domain d, ControlPoint c) => Eq (GLmap2 c d) |
(Ord d, Domain d, ControlPoint c) => Ord (GLmap2 c d) |
(Show d, Domain d, ControlPoint c) => Show (GLmap2 c d) |

map2 :: (Map2 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d))
Using Evaluator Maps
Evaluating an Arbitrary Coordinate Value
Using Evenly Spaced Coordinate Values
Defining a Grid
mapGrid1 :: Domain d => StateVar (GLint, (d, d))
mapGrid2 :: Domain d => StateVar ((GLint, (d, d)), (GLint, (d, d)))
Evaluating a Whole Mesh
evalMesh1 :: PolygonMode -> (GLint, GLint) -> IO ()
evalMesh2 :: PolygonMode -> (GLint, GLint) -> (GLint, GLint) -> IO ()
Evaluating a Single Point on a Mesh
evalPoint1 :: GLint -> IO ()
evalPoint2 :: (GLint, GLint) -> IO ()
Normal Generation
autoNormal :: StateVar Capability
Produced by Haddock version 2.7.2