Copyright | (c) Sven Panne 2002-2019 |
---|---|
License | BSD3 |
Maintainer | Sven Panne <svenpanne@gmail.com> |
Stability | stable |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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
- data 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 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 GLmap2 (c :: * -> *) d
- map2 :: (Map2 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d))
- evalCoord1 :: Domain d => d -> IO ()
- evalCoord1v :: Domain d => Ptr d -> IO ()
- evalCoord2 :: Domain d => (d, d) -> IO ()
- evalCoord2v :: Domain d => Ptr d -> IO ()
- 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
class Storable d => Domain d Source #
glMap1, glMap2, glGetMapv, evalCoord1, evalCoord1v, evalCoord2, evalCoord2v, glMapGrid1, glMapGrid2, get2, get4
Instances
data MapDescriptor d Source #
MapDescriptor (d, d) Stride Order NumComponents |
Instances
Eq d => Eq (MapDescriptor d) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators (==) :: MapDescriptor d -> MapDescriptor d -> Bool # (/=) :: MapDescriptor d -> MapDescriptor d -> Bool # | |
Ord d => Ord (MapDescriptor d) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators compare :: MapDescriptor d -> MapDescriptor d -> Ordering # (<) :: MapDescriptor d -> MapDescriptor d -> Bool # (<=) :: MapDescriptor d -> MapDescriptor d -> Bool # (>) :: MapDescriptor d -> MapDescriptor d -> Bool # (>=) :: MapDescriptor d -> MapDescriptor d -> Bool # max :: MapDescriptor d -> MapDescriptor d -> MapDescriptor d # min :: MapDescriptor d -> MapDescriptor d -> MapDescriptor d # | |
Show d => Show (MapDescriptor d) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators showsPrec :: Int -> MapDescriptor d -> ShowS # show :: MapDescriptor d -> String # showList :: [MapDescriptor d] -> ShowS # |
class ControlPoint c Source #
map1Target, map2Target, enableCap1, enableCap2, numComponents, peekControlPoint, pokeControlPoint
Instances
Defining Evaluator Maps
One-dimensional Evaluator Maps
Nothing
withNewMap1 :: (ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d) Source #
withMap1 :: (ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> Ptr d -> IO a) -> IO a Source #
newMap1 :: (ControlPoint c, Domain d) => (d, d) -> [c d] -> IO (m c d) Source #
getMap1Components :: (ControlPoint c, Domain d) => m c d -> IO ((d, d), [c d]) Source #
Instances
Map1 GLmap1 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators withNewMap1 :: (ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> IO ()) -> IO (GLmap1 c d) Source # withMap1 :: (ControlPoint c, Domain d) => GLmap1 c d -> (MapDescriptor d -> Ptr d -> IO a) -> IO a Source # newMap1 :: (ControlPoint c, Domain d) => (d, d) -> [c d] -> IO (GLmap1 c d) Source # getMap1Components :: (ControlPoint c, Domain d) => GLmap1 c d -> IO ((d, d), [c d]) Source # |
data GLmap1 (c :: * -> *) d Source #
Instances
Map1 GLmap1 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators withNewMap1 :: (ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> IO ()) -> IO (GLmap1 c d) Source # withMap1 :: (ControlPoint c, Domain d) => GLmap1 c d -> (MapDescriptor d -> Ptr d -> IO a) -> IO a Source # newMap1 :: (ControlPoint c, Domain d) => (d, d) -> [c d] -> IO (GLmap1 c d) Source # getMap1Components :: (ControlPoint c, Domain d) => GLmap1 c d -> IO ((d, d), [c d]) Source # | |
Eq d => Eq (GLmap1 c d) Source # | |
Ord d => Ord (GLmap1 c d) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators | |
Show d => Show (GLmap1 c d) Source # | |
Two-dimensional Evaluator Maps
Nothing
withNewMap2 :: (ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d) Source #
withMap2 :: (ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> IO a) -> IO a Source #
newMap2 :: (ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> IO (m c d) Source #
getMap2Components :: (ControlPoint c, Domain d) => m c d -> IO ((d, d), (d, d), [[c d]]) Source #
Instances
Map2 GLmap2 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators withNewMap2 :: (ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> IO ()) -> IO (GLmap2 c d) Source # withMap2 :: (ControlPoint c, Domain d) => GLmap2 c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> IO a) -> IO a Source # newMap2 :: (ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> IO (GLmap2 c d) Source # getMap2Components :: (ControlPoint c, Domain d) => GLmap2 c d -> IO ((d, d), (d, d), [[c d]]) Source # |
data GLmap2 (c :: * -> *) d Source #
Instances
Map2 GLmap2 Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators withNewMap2 :: (ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> IO ()) -> IO (GLmap2 c d) Source # withMap2 :: (ControlPoint c, Domain d) => GLmap2 c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> IO a) -> IO a Source # newMap2 :: (ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> IO (GLmap2 c d) Source # getMap2Components :: (ControlPoint c, Domain d) => GLmap2 c d -> IO ((d, d), (d, d), [[c d]]) Source # | |
Eq d => Eq (GLmap2 c d) Source # | |
Ord d => Ord (GLmap2 c d) Source # | |
Defined in Graphics.Rendering.OpenGL.GL.Evaluators | |
Show d => Show (GLmap2 c d) Source # | |
Using Evaluator Maps
Evaluating an Arbitrary Coordinate Value
evalCoord1 :: Domain d => d -> IO () Source #
evalCoord2 :: Domain d => (d, d) -> IO () Source #
Using Evenly Spaced Coordinate Values
Defining a Grid
Evaluating a Whole Mesh
Evaluating a Single Point on a Mesh
evalPoint1 :: GLint -> IO () Source #