OpenGL-2.13.2.0: A binding for the OpenGL graphics system

Copyright(c) Sven Panne 2002-2013
LicenseBSD3
MaintainerSven Panne <svenpanne@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Graphics.Rendering.OpenGL.GL.Evaluators

Contents

Description

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

Synopsis

Evaluator-related Types

class Storable d => Domain d where Source

Minimal complete definition

glMap1, glMap2, glGetMapv, evalCoord1, evalCoord1v, evalCoord2, evalCoord2v, glMapGrid1, glMapGrid2, get2, get4

Methods

evalCoord1 :: d -> IO () Source

evalCoord1v :: Ptr d -> IO () Source

evalCoord2 :: (d, d) -> IO () Source

evalCoord2v :: Ptr d -> IO () Source

class ControlPoint c Source

Minimal complete definition

map1Target, map2Target, enableCap1, enableCap2, numComponents, peekControlPoint, pokeControlPoint

Defining Evaluator Maps

One-dimensional Evaluator Maps

class Map1 m where Source

Minimal complete definition

Nothing

Methods

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

data GLmap1 c d Source

Instances

Map1 GLmap1 Source 
Eq d => Eq (GLmap1 c d) Source 
Ord d => Ord (GLmap1 c d) Source 
Show d => Show (GLmap1 c d) Source 

map1 :: (Map1 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d)) Source

Two-dimensional Evaluator Maps

class Map2 m where Source

Minimal complete definition

Nothing

Methods

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

data GLmap2 c d Source

Instances

Map2 GLmap2 Source 
Eq d => Eq (GLmap2 c d) Source 
Ord d => Ord (GLmap2 c d) Source 
Show d => Show (GLmap2 c d) Source 

map2 :: (Map2 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d)) Source

Using Evaluator Maps

Evaluating an Arbitrary Coordinate Value

Using Evenly Spaced Coordinate Values

Defining a Grid

mapGrid1 :: Domain d => StateVar (GLint, (d, d)) Source

mapGrid2 :: Domain d => StateVar ((GLint, (d, d)), (GLint, (d, d))) Source

Evaluating a Whole Mesh

Evaluating a Single Point on a Mesh

Normal Generation