OpenGL-3.0.3.0: A binding for the OpenGL graphics system

Copyright(c) Sven Panne 2002-2019
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 Source #

Minimal complete definition

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

Instances
Domain GLfloat Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Domain

Methods

glMap1 :: GLenum -> GLfloat -> GLfloat -> GLint -> GLint -> Ptr GLfloat -> IO ()

glMap2 :: GLenum -> GLfloat -> GLfloat -> GLint -> GLint -> GLfloat -> GLfloat -> GLint -> GLint -> Ptr GLfloat -> IO ()

glGetMapv :: GLenum -> GLenum -> Ptr GLfloat -> IO ()

evalCoord1 :: GLfloat -> IO () Source #

evalCoord1v :: Ptr GLfloat -> IO () Source #

evalCoord2 :: (GLfloat, GLfloat) -> IO () Source #

evalCoord2v :: Ptr GLfloat -> IO () Source #

glMapGrid1 :: GLint -> GLfloat -> GLfloat -> IO ()

glMapGrid2 :: GLint -> GLfloat -> GLfloat -> GLint -> GLfloat -> GLfloat -> IO ()

get2 :: GetPName2F p => (GLfloat -> GLfloat -> a) -> p -> IO a

get4 :: GetPName4F p => (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a

Domain GLdouble Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Domain

Methods

glMap1 :: GLenum -> GLdouble -> GLdouble -> GLint -> GLint -> Ptr GLdouble -> IO ()

glMap2 :: GLenum -> GLdouble -> GLdouble -> GLint -> GLint -> GLdouble -> GLdouble -> GLint -> GLint -> Ptr GLdouble -> IO ()

glGetMapv :: GLenum -> GLenum -> Ptr GLdouble -> IO ()

evalCoord1 :: GLdouble -> IO () Source #

evalCoord1v :: Ptr GLdouble -> IO () Source #

evalCoord2 :: (GLdouble, GLdouble) -> IO () Source #

evalCoord2v :: Ptr GLdouble -> IO () Source #

glMapGrid1 :: GLint -> GLdouble -> GLdouble -> IO ()

glMapGrid2 :: GLint -> GLdouble -> GLdouble -> GLint -> GLdouble -> GLdouble -> IO ()

get2 :: GetPName2F p => (GLdouble -> GLdouble -> a) -> p -> IO a

get4 :: GetPName4F p => (GLdouble -> GLdouble -> GLdouble -> GLdouble -> a) -> p -> IO a

class ControlPoint c Source #

Minimal complete definition

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

Instances
ControlPoint Vertex4 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

Methods

map1Target :: Domain d => Vertex4 d -> GLenum

map2Target :: Domain d => Vertex4 d -> GLenum

enableCap1 :: Domain d => Vertex4 d -> EnableCap

enableCap2 :: Domain d => Vertex4 d -> EnableCap

numComponents :: Domain d => Vertex4 d -> Stride

peekControlPoint :: Domain d => Ptr (Vertex4 d) -> IO (Vertex4 d)

pokeControlPoint :: Domain d => Ptr (Vertex4 d) -> Vertex4 d -> IO ()

ControlPoint Vertex3 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

Methods

map1Target :: Domain d => Vertex3 d -> GLenum

map2Target :: Domain d => Vertex3 d -> GLenum

enableCap1 :: Domain d => Vertex3 d -> EnableCap

enableCap2 :: Domain d => Vertex3 d -> EnableCap

numComponents :: Domain d => Vertex3 d -> Stride

peekControlPoint :: Domain d => Ptr (Vertex3 d) -> IO (Vertex3 d)

pokeControlPoint :: Domain d => Ptr (Vertex3 d) -> Vertex3 d -> IO ()

ControlPoint Index1 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

Methods

map1Target :: Domain d => Index1 d -> GLenum

map2Target :: Domain d => Index1 d -> GLenum

enableCap1 :: Domain d => Index1 d -> EnableCap

enableCap2 :: Domain d => Index1 d -> EnableCap

numComponents :: Domain d => Index1 d -> Stride

peekControlPoint :: Domain d => Ptr (Index1 d) -> IO (Index1 d)

pokeControlPoint :: Domain d => Ptr (Index1 d) -> Index1 d -> IO ()

ControlPoint Color4 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

Methods

map1Target :: Domain d => Color4 d -> GLenum

map2Target :: Domain d => Color4 d -> GLenum

enableCap1 :: Domain d => Color4 d -> EnableCap

enableCap2 :: Domain d => Color4 d -> EnableCap

numComponents :: Domain d => Color4 d -> Stride

peekControlPoint :: Domain d => Ptr (Color4 d) -> IO (Color4 d)

pokeControlPoint :: Domain d => Ptr (Color4 d) -> Color4 d -> IO ()

ControlPoint Normal3 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

Methods

map1Target :: Domain d => Normal3 d -> GLenum

map2Target :: Domain d => Normal3 d -> GLenum

enableCap1 :: Domain d => Normal3 d -> EnableCap

enableCap2 :: Domain d => Normal3 d -> EnableCap

numComponents :: Domain d => Normal3 d -> Stride

peekControlPoint :: Domain d => Ptr (Normal3 d) -> IO (Normal3 d)

pokeControlPoint :: Domain d => Ptr (Normal3 d) -> Normal3 d -> IO ()

ControlPoint TexCoord4 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

ControlPoint TexCoord3 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

ControlPoint TexCoord2 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

ControlPoint TexCoord1 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.ControlPoint

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
Map1 GLmap1 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

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 # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

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 # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

(==) :: GLmap1 c d -> GLmap1 c d -> Bool #

(/=) :: GLmap1 c d -> GLmap1 c d -> Bool #

Ord d => Ord (GLmap1 c d) Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

compare :: GLmap1 c d -> GLmap1 c d -> Ordering #

(<) :: GLmap1 c d -> GLmap1 c d -> Bool #

(<=) :: GLmap1 c d -> GLmap1 c d -> Bool #

(>) :: GLmap1 c d -> GLmap1 c d -> Bool #

(>=) :: GLmap1 c d -> GLmap1 c d -> Bool #

max :: GLmap1 c d -> GLmap1 c d -> GLmap1 c d #

min :: GLmap1 c d -> GLmap1 c d -> GLmap1 c d #

Show d => Show (GLmap1 c d) Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

showsPrec :: Int -> GLmap1 c d -> ShowS #

show :: GLmap1 c d -> String #

showList :: [GLmap1 c d] -> ShowS #

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
Map2 GLmap2 Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

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 # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

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 # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

(==) :: GLmap2 c d -> GLmap2 c d -> Bool #

(/=) :: GLmap2 c d -> GLmap2 c d -> Bool #

Ord d => Ord (GLmap2 c d) Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

compare :: GLmap2 c d -> GLmap2 c d -> Ordering #

(<) :: GLmap2 c d -> GLmap2 c d -> Bool #

(<=) :: GLmap2 c d -> GLmap2 c d -> Bool #

(>) :: GLmap2 c d -> GLmap2 c d -> Bool #

(>=) :: GLmap2 c d -> GLmap2 c d -> Bool #

max :: GLmap2 c d -> GLmap2 c d -> GLmap2 c d #

min :: GLmap2 c d -> GLmap2 c d -> GLmap2 c d #

Show d => Show (GLmap2 c d) Source # 
Instance details

Defined in Graphics.Rendering.OpenGL.GL.Evaluators

Methods

showsPrec :: Int -> GLmap2 c d -> ShowS #

show :: GLmap2 c d -> String #

showList :: [GLmap2 c d] -> ShowS #

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

Using Evaluator Maps

Evaluating an Arbitrary Coordinate Value

evalCoord1 :: Domain d => d -> IO () Source #

evalCoord1v :: Domain d => Ptr d -> IO () Source #

evalCoord2 :: Domain d => (d, d) -> IO () Source #

evalCoord2v :: Domain d => Ptr d -> IO () Source #

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