-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | A binding for the OpenGL graphics system
--   
--   A Haskell binding for the OpenGL graphics system (GL, version 2.1) and
--   its accompanying utility library (GLU, version 1.3). OpenGL is the
--   industry's most widely used and supported 2D and 3D graphics
--   application programming interface (API), incorporating a broad set of
--   rendering, texture mapping, special effects, and other powerful
--   visualization functions. For more information about OpenGL, please
--   see: <a>http://www.opengl.org/</a>.
@package OpenGL
@version 2.2.3.1


-- | This module corresponds to section 5.5 (Flush and Finish) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.FlushFinish

-- | Different GL implementations buffer commands in several different
--   locations, including network buffers and the graphics accelerator
--   itself. <a>flush</a> empties all of these buffers, causing all issued
--   commands to be executed as quickly as they are accepted by the actual
--   rendering engine. Though this execution may not be completed in any
--   particular time period, it does complete in finite time.
--   
--   Because any GL program might be executed over a network, or on an
--   accelerator that buffers commands, all programs should call
--   <a>flush</a> whenever they count on having all of their previously
--   issued commands completed. For example, call <a>flush</a> before
--   waiting for user input that depends on the generated image.
--   
--   Note that <a>flush</a> can return at any time. It does not wait until
--   the execution of all previously issued GL commands is complete.
flush :: IO ()

-- | <a>finish</a> does not return until the effects of all previously
--   called GL commands are complete. Such effects include all changes to
--   GL state, all changes to connection state, and all changes to the
--   frame buffer contents.
--   
--   Note that <a>finish</a> requires a round trip to the server.
finish :: IO ()


module Graphics.Rendering.OpenGL.GL.StateVar
class HasGetter g
get :: HasGetter g => g a -> IO a
data GettableStateVar a
makeGettableStateVar :: IO a -> GettableStateVar a
class HasSetter s
($=) :: HasSetter s => s a -> a -> IO ()

-- | <i>Deprecated: use `sequence_' instead</i>
set :: [IO ()] -> IO ()
data SettableStateVar a
makeSettableStateVar :: (a -> IO ()) -> SettableStateVar a
data StateVar a
makeStateVar :: IO a -> (a -> IO ()) -> StateVar a

-- | A modificator convenience function.
($~) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()

-- | A strict variant of <a>$=</a>.
($=!) :: HasSetter s => s a -> a -> IO ()

-- | A strict variant of <a>$~</a>.
($~!) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()
instance HasSetter IORef
instance HasGetter IORef
instance HasSetter StateVar
instance HasGetter StateVar
instance HasSetter SettableStateVar
instance HasGetter GettableStateVar


-- | This module corresponds to section 2.3 (GL Command Sytax) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.BasicTypes

-- | Boolean (min. 1 bit)
type GLboolean = Word8

-- | Signed 2's complement binary integer (min. 8 bits)
type GLbyte = Int8

-- | Unsigned binary integer (min. 8 bits)
type GLubyte = Word8

-- | Characters making up strings
type GLchar = Int8

-- | Signed 2's complement binary integer (min. 16 bits)
type GLshort = Int16

-- | Unsigned binary integer (min. 16 bits)
type GLushort = Word16

-- | Signed 2's complement binary integer (min. 32 bits)
type GLint = Int32

-- | Unsigned binary integer (min. 32 bits)
type GLuint = Word32

-- | Non-negatitve binary integer size (min. 32 bits)
type GLsizei = Int32

-- | Enumerated binary integer value (min. 32 bits)
type GLenum = Word32

-- | Signed 2's complement binary integer (sufficiently large enough to
--   hold any address)
type GLintptr = Int32

-- | Non-negatitve binary integer size (sufficiently large enough to hold
--   any address)
type GLsizeiptr = Int32

-- | Bit field (min. 32 bits)
type GLbitfield = Word32

-- | Floating-point value (min. 32 bits)
type GLfloat = Float

-- | Floating-point value clamped to [0,1] (min. 32 bits)
type GLclampf = Float

-- | Floating-point value (min. 64 bits)
type GLdouble = Double

-- | Floating-point value clamped to [0,1] (min. 64 bits)
type GLclampd = Double
data Capability
Disabled :: Capability
Enabled :: Capability
instance Eq Capability
instance Ord Capability
instance Show Capability


-- | This module corresponds to section 2.6 (Begin/End Paradigm) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.BeginEnd

-- | Specification of the way the vertices given during
--   <tt>renderPrimitive</tt> are interpreted. In the description of the
--   constructors, <i>n</i> is an integer count starting at one, and
--   <i>N</i> is the total number of vertices specified.
data PrimitiveMode

-- | Treats each vertex as a single point. Vertex <i>n</i> defines point
--   <i>n</i>. <i>N</i> points are drawn.
Points :: PrimitiveMode

-- | Treats each pair of vertices as an independent line segment. Vertices
--   2<i>n</i>-1 and 2<i>n</i> define line <i>n</i>. <i>N</i>/2 lines are
--   drawn.
Lines :: PrimitiveMode

-- | Draws a connected group of line segments from the first vertex to the
--   last, then back to the first. Vertices <i>n</i> and <i>n</i>+1 define
--   line <i>n</i>. The last line, however, is defined by vertices <i>N</i>
--   and 1. <i>N</i> lines are drawn.
LineLoop :: PrimitiveMode

-- | Draws a connected group of line segments from the first vertex to the
--   last. Vertices <i>n</i> and <i>n</i>+1 define line <i>n</i>.
--   <i>N</i>-1 lines are drawn.
LineStrip :: PrimitiveMode

-- | Treats each triplet of vertices as an independent triangle. Vertices
--   <i>3n-2</i>, <i>3n-1</i>, and <i>3n</i> define triangle <i>n</i>.
--   <i>N\</i>3/ triangles are drawn.
Triangles :: PrimitiveMode

-- | Draws a connected group of triangles. One triangle is defined for each
--   vertex presented after the first two vertices. For odd <i>n</i>,
--   vertices <i>n</i>, <i>n</i>+1, and <i>n</i>+2 define triangle
--   <i>n</i>. For even <i>n</i>, vertices <i>n</i>+1, <i>n</i>, and
--   <i>n</i>+2 define triangle <i>n</i>. <i>N</i>-2 triangles are drawn.
TriangleStrip :: PrimitiveMode

-- | Draws a connected group of triangles. One triangle is defined for each
--   vertex presented after the first two vertices. Vertices 1, <i>n</i>+1,
--   and <i>n</i>+2 define triangle <i>n</i>. <i>N</i>-2 triangles are
--   drawn.
TriangleFan :: PrimitiveMode

-- | Treats each group of four vertices as an independent quadrilateral.
--   Vertices 4<i>n</i>-3, 4<i>n</i>-2, 4<i>n</i>-1, and 4<i>n</i> define
--   quadrilateral <i>n</i>. <i>N</i>/4 quadrilaterals are drawn.
Quads :: PrimitiveMode

-- | Draws a connected group of quadrilaterals. One quadrilateral is
--   defined for each pair of vertices presented after the first pair.
--   Vertices 2<i>n</i>-1, 2<i>n</i>, 2<i>n</i>+2, and 2<i>n</i>+1 define
--   quadrilateral <i>n</i>. <i>N</i>/2-1 quadrilaterals are drawn. Note
--   that the order in which vertices are used to construct a quadrilateral
--   from strip data is different from that used with independent data.
QuadStrip :: PrimitiveMode

-- | Draws a single, convex polygon. Vertices 1 through <i>N</i> define
--   this polygon.
Polygon :: PrimitiveMode

-- | Delimit the vertices that define a primitive or a group of like
--   primitives.
--   
--   Only a subset of GL commands can be used in the delimited action:
--   Those for specifying vertex coordinates (<a>vertex</a>,
--   <a>vertexv</a>), vertex colors (<a>color</a>, <a>colorv</a>,
--   <a>secondaryColor</a>, <a>secondaryColorv</a>, <a>index</a>,
--   <a>indexv</a>), normal (<a>normal</a>, <a>normalv</a>), texture
--   coordinates (<a>texCoord</a>, <a>texCoordv</a>, <a>multiTexCoord</a>,
--   <a>multiTexCoordv</a>), and fog coordinates (<a>fogCoord</a>,
--   <a>fogCoordv</a>). Additionally, <a>evalPoint1</a>, <a>evalPoint2</a>,
--   <a>evalCoord1</a>, <a>evalCoord1v</a>, <a>evalCoord2</a>,
--   <a>evalCoord2v</a>, <a>materialAmbient</a>, <a>materialDiffuse</a>,
--   <a>materialAmbientAndDiffuse</a>, <a>materialSpecular</a>,
--   <a>materialEmission</a>, <a>materialShininess</a>, <a>callList</a>,
--   <a>callLists</a>, and setting <a>edgeFlag</a> are allowed. Writing the
--   respective state variables is allowed in the delimited action, too.
--   
--   Regardless of the chosen <a>PrimitiveMode</a>, there is no limit to
--   the number of vertices that can be defined during a single
--   <a>renderPrimitive</a>. Lines, triangles, quadrilaterals, and polygons
--   that are incompletely specified are not drawn. Incomplete
--   specification results when either too few vertices are provided to
--   specify even a single primitive or when an incorrect multiple of
--   vertices is specified. The incomplete primitive is ignored; the rest
--   are drawn.
--   
--   The minimum specification of vertices for each primitive is as
--   follows: 1 for a point, 2 for a line, 3 for a triangle, 4 for a
--   quadrilateral, and 3 for a polygon. Modes that require a certain
--   multiple of vertices are <a>Lines</a> (2), <a>Triangles</a> (3),
--   <a>Quads</a> (4), and <a>QuadStrip</a> (2).
renderPrimitive :: PrimitiveMode -> IO a -> IO a

-- | A more efficient, but potentially dangerous version of
--   <a>renderPrimitive</a>: The given action is not allowed to throw an
--   exception.
unsafeRenderPrimitive :: PrimitiveMode -> IO a -> IO a
primitiveRestart :: IO ()

-- | A vertex can begin an edge which lies in the interior of its polygon
--   or on the polygon's boundary.
data EdgeFlag
BeginsInteriorEdge :: EdgeFlag
BeginsBoundaryEdge :: EdgeFlag

-- | Each vertex of a polygon, separate triangle, or separate quadrilateral
--   specified during <a>renderPrimitive</a> is marked as the start of
--   either a boundary or nonboundary (interior) edge.
--   
--   The vertices of connected triangles and connected quadrilaterals are
--   always marked as boundary, regardless of the value of the edge flag.
--   
--   Boundary and nonboundary edge flags on vertices are significant only
--   if <a>polygonMode</a> is set to <a>Point</a> or <a>Line</a>.
--   
--   Note that the current edge flag can be updated at any time, in
--   particular during <a>renderPrimitive</a>.
edgeFlag :: StateVar EdgeFlag


-- | This module corresponds to section 2.5 (GL Errors) of the OpenGL 2.1
--   specs and chapter 8 (Errors) of the GLU specs, offering a generalized
--   view of errors in GL and GLU.
module Graphics.Rendering.OpenGL.GLU.Errors

-- | GL/GLU errors consist of a general error category and a description of
--   what went wrong.
data Error
Error :: ErrorCategory -> String -> Error

-- | General GL/GLU error categories
data ErrorCategory
InvalidEnum :: ErrorCategory
InvalidValue :: ErrorCategory
InvalidOperation :: ErrorCategory
InvalidFramebufferOperation :: ErrorCategory
OutOfMemory :: ErrorCategory
StackOverflow :: ErrorCategory
StackUnderflow :: ErrorCategory
TableTooLarge :: ErrorCategory
TesselatorError :: ErrorCategory
NURBSError :: ErrorCategory

-- | When an error occurs, it is recorded in this state variable and no
--   further errors are recorded. Reading <a>errors</a> returns the
--   currently recorded errors (there may be more than one due to a
--   possibly distributed implementation) and resets the state variable to
--   <tt>[]</tt>, re-enabling the recording of future errors. The value
--   <tt>[]</tt> means that there has been no detectable error since the
--   last time <a>errors</a> was read, or since the GL was initialized.
errors :: GettableStateVar [Error]


-- | This module corresponds to section 2.7 (Vertex Specification) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.VertexSpec

-- | Specify the (<i>x</i>, <i>y</i>, <i>z</i>, <i>w</i>) coordinates of a
--   four-dimensional vertex. This must only be done during
--   <a>renderPrimitive</a>, otherwise the behaviour is unspecified. The
--   current values of the auxiliary vertex attributes are associated with
--   the vertex.
--   
--   Note that there is no such thing as a "current vertex" which could be
--   retrieved.
class Vertex a
vertex :: Vertex a => a -> IO ()
vertexv :: Vertex a => Ptr a -> IO ()

-- | The class of all types which can be used as a vertex coordinate.
class VertexComponent a

-- | A vertex with <i>y</i>=0, <i>z</i>=0 and <i>w</i>=1.
newtype Vertex1 a
Vertex1 :: a -> Vertex1 a

-- | A vertex with <i>z</i>=0 and <i>w</i>=1.
data Vertex2 a
Vertex2 :: !a -> !a -> Vertex2 a

-- | A vertex with <i>w</i>=1.
data Vertex3 a
Vertex3 :: !a -> !a -> !a -> Vertex3 a

-- | A fully-fledged four-dimensional vertex.
data Vertex4 a
Vertex4 :: !a -> !a -> !a -> !a -> Vertex4 a

-- | The current texture coordinates (<i>s</i>, <i>t</i>, <i>r</i>,
--   <i>q</i>) for the current texture unit (see <a>activeTexture</a>). The
--   initial value is (0,0,0,1) for all texture units.
currentTextureCoords :: StateVar (TexCoord4 GLfloat)

-- | Change the current texture coordinates of the current or given texture
--   unit.
class TexCoord a
texCoord :: TexCoord a => a -> IO ()
texCoordv :: TexCoord a => Ptr a -> IO ()
multiTexCoord :: TexCoord a => TextureUnit -> a -> IO ()
multiTexCoordv :: TexCoord a => TextureUnit -> Ptr a -> IO ()

-- | The class of all types which can be used as a texture coordinate.
class TexCoordComponent a

-- | Texture coordinates with <i>t</i>=0, <i>r</i>=0, and <i>q</i>=1.
newtype TexCoord1 a
TexCoord1 :: a -> TexCoord1 a

-- | Texture coordinates with <i>r</i>=0 and <i>q</i>=1.
data TexCoord2 a
TexCoord2 :: !a -> !a -> TexCoord2 a

-- | Texture coordinates with <i>q</i>=1.
data TexCoord3 a
TexCoord3 :: !a -> !a -> !a -> TexCoord3 a

-- | Fully-fledged four-dimensional texture coordinates.
data TexCoord4 a
TexCoord4 :: !a -> !a -> !a -> !a -> TexCoord4 a

-- | The current normal (<i>x</i>, <i>y</i>, <i>z</i>). The initial value
--   is the unit vector (0, 0, 1).
currentNormal :: StateVar (Normal3 GLfloat)

-- | Change the current normal. Integral arguments are converted to
--   floating-point with a linear mapping that maps the most positive
--   representable integer value to 1.0, and the most negative
--   representable integer value to -1.0.
--   
--   Normals specified with <a>normal</a> or <a>normalv</a> need not have
--   unit length. If <a>normalize</a> is enabled, then normals of any
--   length specified with <a>normal</a> or <a>normalv</a> are normalized
--   after transformation. If <a>rescaleNormal</a> is enabled, normals are
--   scaled by a scaling factor derived from the modelview matrix.
--   <a>rescaleNormal</a> requires that the originally specified normals
--   were of unit length, and that the modelview matrix contains only
--   uniform scales for proper results. Normalization is initially
--   disabled.
class Normal a
normal :: Normal a => a -> IO ()
normalv :: Normal a => Ptr a -> IO ()

-- | The class of all types which can be used as a component of a normal.
class NormalComponent a
data Normal3 a
Normal3 :: !a -> !a -> !a -> Normal3 a

-- | The current fog coordinate. The initial value is 0.
currentFogCoord :: StateVar (FogCoord1 GLfloat)

-- | Change the current fog coordinate.
class FogCoord a
fogCoord :: FogCoord a => a -> IO ()
fogCoordv :: FogCoord a => Ptr a -> IO ()

-- | The class of all types which can be used as the fog coordinate.
class FogCoordComponent a

-- | A fog coordinate.
newtype FogCoord1 a
FogCoord1 :: a -> FogCoord1 a

-- | If <a>rgbaMode</a> contains <a>True</a>, the color buffers store RGBA
--   value. If color indexes are stored, it contains <a>False</a>.
rgbaMode :: GettableStateVar Bool
currentColor :: StateVar (Color4 GLfloat)

-- | Change the current color.
class Color a
color :: Color a => a -> IO ()
colorv :: Color a => Ptr a -> IO ()
currentSecondaryColor :: StateVar (Color3 GLfloat)

-- | Change the current secondary color.
class SecondaryColor a
secondaryColor :: SecondaryColor a => a -> IO ()
secondaryColorv :: SecondaryColor a => Ptr a -> IO ()

-- | The class of all types which can be used as a color component.
class ColorComponent a
data Color3 a
Color3 :: !a -> !a -> !a -> Color3 a

-- | A fully-fledged RGBA color.
data Color4 a
Color4 :: !a -> !a -> !a -> !a -> Color4 a
currentIndex :: StateVar (Index1 GLint)

-- | Change the current color index.
class Index a
index :: Index a => a -> IO ()
indexv :: Index a => Ptr a -> IO ()

-- | The class of all types which can be used as a color index.
class IndexComponent a

-- | A color index.
newtype Index1 a
Index1 :: a -> Index1 a
data IntegerHandling
ToFloat :: IntegerHandling
ToNormalizedFloat :: IntegerHandling
KeepIntegral :: IntegerHandling
newtype AttribLocation
AttribLocation :: GLuint -> AttribLocation
currentVertexAttrib :: AttribLocation -> StateVar (Vertex4 GLfloat)
currentVertexAttribI :: AttribLocation -> StateVar (Vertex4 GLint)
currentVertexAttribIu :: AttribLocation -> StateVar (Vertex4 GLuint)
class VertexAttrib a
vertexAttrib :: VertexAttrib a => IntegerHandling -> AttribLocation -> a -> IO ()
vertexAttribv :: VertexAttrib a => IntegerHandling -> AttribLocation -> Ptr a -> IO ()

-- | The class of all types which can be used as a generic vertex
--   attribute. NOTE: Do not use the methods of this class directly, they
--   were only exported by accident and will be hidden in future versions
--   of this package.
class (Storable a, Num a) => VertexAttribComponent a where vertexAttrib1 location x = vertexAttrib4 location x 0 0 1 vertexAttrib2 location x y = vertexAttrib4 location x y 0 1 vertexAttrib3 location x y z = vertexAttrib4 location x y z 1 vertexAttrib4 location x y z w = allocaArray 4 $ \ buf -> do { poke4 buf x y z w; vertexAttrib4v location buf } vertexAttrib1N location x = vertexAttrib4N location x 0 0 1 vertexAttrib2N location x y = vertexAttrib4N location x y 0 1 vertexAttrib3N location x y z = vertexAttrib4N location x y z 1 vertexAttrib4N location x y z w = allocaArray 4 $ \ buf -> do { poke4 buf x y z w; vertexAttrib4Nv location buf } vertexAttrib1I location x = vertexAttrib4I location x 0 0 1 vertexAttrib2I location x y = vertexAttrib4I location x y 0 1 vertexAttrib3I location x y z = vertexAttrib4I location x y z 1 vertexAttrib4I location x y z w = allocaArray 4 $ \ buf -> do { poke4 buf x y z w; vertexAttrib4Iv location buf } vertexAttrib1v location = peek1M $ vertexAttrib1 location vertexAttrib2v location = peek2M $ vertexAttrib2 location vertexAttrib3v location = peek3M $ vertexAttrib3 location vertexAttrib1Nv location = peek1M $ vertexAttrib1N location vertexAttrib2Nv location = peek2M $ vertexAttrib2N location vertexAttrib3Nv location = peek3M $ vertexAttrib3N location vertexAttrib1Iv location = peek1M $ vertexAttrib1I location vertexAttrib2Iv location = peek2M $ vertexAttrib2I location vertexAttrib3Iv location = peek3M $ vertexAttrib3I location
vertexAttrib1 :: VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib2 :: VertexAttribComponent a => AttribLocation -> a -> a -> IO ()
vertexAttrib3 :: VertexAttribComponent a => AttribLocation -> a -> a -> a -> IO ()
vertexAttrib4 :: VertexAttribComponent a => AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib1N :: VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib2N :: VertexAttribComponent a => AttribLocation -> a -> a -> IO ()
vertexAttrib3N :: VertexAttribComponent a => AttribLocation -> a -> a -> a -> IO ()
vertexAttrib4N :: VertexAttribComponent a => AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib1I :: VertexAttribComponent a => AttribLocation -> a -> IO ()
vertexAttrib2I :: VertexAttribComponent a => AttribLocation -> a -> a -> IO ()
vertexAttrib3I :: VertexAttribComponent a => AttribLocation -> a -> a -> a -> IO ()
vertexAttrib4I :: VertexAttribComponent a => AttribLocation -> a -> a -> a -> a -> IO ()
vertexAttrib1v :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib2v :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib3v :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib4v :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib1Nv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib2Nv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib3Nv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib4Nv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib1Iv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib2Iv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib3Iv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()
vertexAttrib4Iv :: VertexAttribComponent a => AttribLocation -> Ptr a -> IO ()

-- | Identifies a texture unit via its number, which must be in the range
--   of (0 .. <tt>maxTextureUnit</tt>).
newtype TextureUnit
TextureUnit :: GLuint -> TextureUnit

-- | An implementation must support at least 2 texture units, but it may
--   support up to 32 ones. This state variable can be used to query the
--   actual implementation limit.
maxTextureUnit :: GettableStateVar TextureUnit
instance Eq IntegerHandling
instance Ord IntegerHandling
instance Show IntegerHandling
instance VertexAttribComponent a => VertexAttrib (Index1 a)
instance VertexAttribComponent a => VertexAttrib (Color4 a)
instance VertexAttribComponent a => VertexAttrib (Color3 a)
instance VertexAttribComponent a => VertexAttrib (FogCoord1 a)
instance VertexAttribComponent a => VertexAttrib (Normal3 a)
instance VertexAttribComponent a => VertexAttrib (TexCoord4 a)
instance VertexAttribComponent a => VertexAttrib (TexCoord3 a)
instance VertexAttribComponent a => VertexAttrib (TexCoord2 a)
instance VertexAttribComponent a => VertexAttrib (TexCoord1 a)
instance VertexAttribComponent a => VertexAttrib (Vector4 a)
instance VertexAttribComponent a => VertexAttrib (Vector3 a)
instance VertexAttribComponent a => VertexAttrib (Vector2 a)
instance VertexAttribComponent a => VertexAttrib (Vector1 a)
instance VertexAttribComponent a => VertexAttrib (Vertex4 a)
instance VertexAttribComponent a => VertexAttrib (Vertex3 a)
instance VertexAttribComponent a => VertexAttrib (Vertex2 a)
instance VertexAttribComponent a => VertexAttrib (Vertex1 a)
instance VertexAttribComponent Double
instance VertexAttribComponent Float
instance VertexAttribComponent Word32
instance VertexAttribComponent Int32
instance VertexAttribComponent Word16
instance VertexAttribComponent Int16
instance VertexAttribComponent Word8
instance VertexAttribComponent Int8
instance IndexComponent a => Index (Index1 a)
instance IndexComponent Word8
instance IndexComponent Double
instance IndexComponent Float
instance IndexComponent Int32
instance IndexComponent Int16
instance ColorComponent a => SecondaryColor (Color3 a)
instance ColorComponent a => Color (Color4 a)
instance ColorComponent a => Color (Color3 a)
instance ColorComponent Word32
instance ColorComponent Word16
instance ColorComponent Word8
instance ColorComponent Double
instance ColorComponent Float
instance ColorComponent Int32
instance ColorComponent Int16
instance ColorComponent Int8
instance FogCoordComponent a => FogCoord (FogCoord1 a)
instance FogCoordComponent Double
instance FogCoordComponent Float
instance NormalComponent a => Normal (Normal3 a)
instance NormalComponent Double
instance NormalComponent Float
instance NormalComponent Int32
instance NormalComponent Int16
instance NormalComponent Int8
instance TexCoordComponent a => TexCoord (TexCoord4 a)
instance TexCoordComponent a => TexCoord (TexCoord3 a)
instance TexCoordComponent a => TexCoord (TexCoord2 a)
instance TexCoordComponent a => TexCoord (TexCoord1 a)
instance TexCoordComponent Double
instance TexCoordComponent Float
instance TexCoordComponent Int32
instance TexCoordComponent Int16
instance VertexComponent a => Vertex (Vertex4 a)
instance VertexComponent a => Vertex (Vertex3 a)
instance VertexComponent a => Vertex (Vertex2 a)
instance VertexComponent Double
instance VertexComponent Float
instance VertexComponent Int32
instance VertexComponent Int16


-- | This module corresponds to section 5.2 (Selection) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Selection
data HitRecord
HitRecord :: GLfloat -> GLfloat -> [Name] -> HitRecord
getHitRecords :: GLsizei -> IO a -> IO (a, Maybe [HitRecord])
newtype Name
Name :: GLuint -> Name
withName :: Name -> IO a -> IO a
loadName :: Name -> IO ()
maxNameStackDepth :: GettableStateVar GLsizei
nameStackDepth :: GettableStateVar GLsizei
data RenderMode
Render :: RenderMode
Feedback :: RenderMode
Select :: RenderMode
renderMode :: GettableStateVar RenderMode
instance Eq Name
instance Ord Name
instance Show Name
instance Eq HitRecord
instance Ord HitRecord
instance Show HitRecord


-- | This module corresponds to section 5.3 (Feedback) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Feedback
data FeedbackToken
PointToken :: VertexInfo -> FeedbackToken
LineToken :: VertexInfo -> VertexInfo -> FeedbackToken
LineResetToken :: VertexInfo -> VertexInfo -> FeedbackToken
PolygonToken :: [VertexInfo] -> FeedbackToken
BitmapToken :: VertexInfo -> FeedbackToken
DrawPixelToken :: VertexInfo -> FeedbackToken
CopyPixelToken :: VertexInfo -> FeedbackToken
PassThroughToken :: PassThroughValue -> FeedbackToken
data VertexInfo
Vertex2D :: (Vertex2 GLfloat) -> VertexInfo
Vertex3D :: (Vertex3 GLfloat) -> VertexInfo
Vertex3DColor :: (Vertex3 GLfloat) -> ColorInfo -> VertexInfo
Vertex3DColorTexture :: (Vertex3 GLfloat) -> ColorInfo -> (TexCoord4 GLfloat) -> VertexInfo
Vertex4DColorTexture :: (Vertex4 GLfloat) -> ColorInfo -> (TexCoord4 GLfloat) -> VertexInfo
type ColorInfo = Either (Index1 GLint) (Color4 GLfloat)
data FeedbackType
TwoD :: FeedbackType
ThreeD :: FeedbackType
ThreeDColor :: FeedbackType
ThreeDColorTexture :: FeedbackType
FourDColorTexture :: FeedbackType
getFeedbackTokens :: GLsizei -> FeedbackType -> IO a -> IO (a, Maybe [FeedbackToken])
newtype PassThroughValue
PassThroughValue :: GLfloat -> PassThroughValue
passThrough :: PassThroughValue -> IO ()
instance Eq VertexInfo
instance Ord VertexInfo
instance Show VertexInfo
instance Eq FeedbackType
instance Ord FeedbackType
instance Show FeedbackType
instance Eq PassThroughValue
instance Ord PassThroughValue
instance Show PassThroughValue
instance Eq FeedbackToken
instance Ord FeedbackToken
instance Show FeedbackToken


-- | This module corresponds to section 5.6 (Hints) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Hints
data HintTarget
PerspectiveCorrection :: HintTarget
PointSmooth :: HintTarget
LineSmooth :: HintTarget
PolygonSmooth :: HintTarget
Fog :: HintTarget
GenerateMipmap :: HintTarget
TextureCompression :: HintTarget
PackCMYK :: HintTarget
UnpackCMYK :: HintTarget
data HintMode
DontCare :: HintMode
Fastest :: HintMode
Nicest :: HintMode
hint :: HintTarget -> StateVar HintMode
instance Eq HintTarget
instance Ord HintTarget
instance Show HintTarget
instance Eq HintMode
instance Ord HintMode
instance Show HintMode


-- | This module corresponds to section 2.10 (Rectangles) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Rectangles

-- | <a>rect</a> and <a>rectv</a> support efficient specification of
--   rectangles as two corner points. Each rectangle command takes four
--   arguments, organized either as two consecutive pairs of (<i>x</i>,
--   <i>y</i>) coordinates, or as two pointers to arrays, each containing
--   an (<i>x</i>, <i>y</i>) pair. The resulting rectangle is defined in
--   the <i>z</i> = 0 plane.
--   
--   <tt><a>rect</a> (<a>Vertex2</a> x1 y1) (<a>Vertex2</a> x2, y2)</tt> is
--   exactly equivalent to the following sequence:
--   
--   <pre>
--   <a>renderPrimitive</a> <a>Polygon</a> $ do
--       <a>vertex</a> (<a>Vertex2</a> x1 y1)
--       <a>vertex</a> (<a>Vertex2</a> x2 y1)
--       <a>vertex</a> (<a>Vertex2</a> x2 y2)
--       <a>vertex</a> (<a>Vertex2</a> x1 y2)
--   </pre>
--   
--   Note that if the second vertex is above and to the right of the first
--   vertex, the rectangle is constructed with a counterclockwise winding.
class Rect a
rect :: Rect a => Vertex2 a -> Vertex2 a -> IO ()
rectv :: Rect a => Ptr a -> Ptr a -> IO ()
instance Rect Double
instance Rect Float
instance Rect Int32
instance Rect Int16


-- | This module corresponds to parts of section 6.1.11 (Pointer and String
--   Queries) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.StringQueries
vendor :: GettableStateVar String
renderer :: GettableStateVar String
glVersion :: GettableStateVar String
glExtensions :: GettableStateVar [String]
shadingLanguageVersion :: GettableStateVar String

-- | A utility function to be used with e.g. <a>glVersion</a> or
--   <a>shadingLanguageVersion</a>, transforming a variable containing a
--   string of the form <i>major.minor[optional rest]</i> into a variable
--   containing a numeric major/minor version. If the string is malformed,
--   which should never happen with a sane OpenGL implementation, it is
--   transformed to <tt>(-1,-1)</tt>.
majorMinor :: GettableStateVar String -> GettableStateVar (Int, Int)


-- | This module corresponds to section 6.1.14 (Saving and Restoring State)
--   of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.SavingState
data ServerAttributeGroup
CurrentAttributes :: ServerAttributeGroup
PointAttributes :: ServerAttributeGroup
LineAttributes :: ServerAttributeGroup
PolygonAttributes :: ServerAttributeGroup
PolygonStippleAttributes :: ServerAttributeGroup
PixelModeAttributes :: ServerAttributeGroup
LightingAttributes :: ServerAttributeGroup
FogAttributes :: ServerAttributeGroup
DepthBufferAttributes :: ServerAttributeGroup
AccumBufferAttributes :: ServerAttributeGroup
StencilBufferAttributes :: ServerAttributeGroup
ViewportAttributes :: ServerAttributeGroup
TransformAttributes :: ServerAttributeGroup
EnableAttributes :: ServerAttributeGroup
ColorBufferAttributes :: ServerAttributeGroup
HintAttributes :: ServerAttributeGroup
EvalAttributes :: ServerAttributeGroup
ListAttributes :: ServerAttributeGroup
TextureAttributes :: ServerAttributeGroup
ScissorAttributes :: ServerAttributeGroup
MultisampleAttributes :: ServerAttributeGroup
AllServerAttributes :: ServerAttributeGroup
preservingAttrib :: [ServerAttributeGroup] -> IO a -> IO a
data ClientAttributeGroup
PixelStoreAttributes :: ClientAttributeGroup
VertexArrayAttributes :: ClientAttributeGroup
AllClientAttributes :: ClientAttributeGroup
preservingClientAttrib :: [ClientAttributeGroup] -> IO a -> IO a
instance Eq ServerAttributeGroup
instance Ord ServerAttributeGroup
instance Show ServerAttributeGroup
instance Eq ClientAttributeGroup
instance Ord ClientAttributeGroup
instance Show ClientAttributeGroup


-- | This module corresponds to section 3.6.1 (Pixel Storage Modes) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelStorage
data PixelStoreDirection
Pack :: PixelStoreDirection
Unpack :: PixelStoreDirection
swapBytes :: PixelStoreDirection -> StateVar Bool
lsbFirst :: PixelStoreDirection -> StateVar Bool
rowLength :: PixelStoreDirection -> StateVar GLint
skipRows :: PixelStoreDirection -> StateVar GLint
skipPixels :: PixelStoreDirection -> StateVar GLint
rowAlignment :: PixelStoreDirection -> StateVar GLint
imageHeight :: PixelStoreDirection -> StateVar GLint
skipImages :: PixelStoreDirection -> StateVar GLint
instance Eq PixelStoreDirection
instance Ord PixelStoreDirection
instance Show PixelStoreDirection


-- | This module corresponds to a part of section 3.6.1 (Pixel Storage
--   Modes) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap
data PixelMapTarget
IToI :: PixelMapTarget
SToS :: PixelMapTarget
IToR :: PixelMapTarget
IToG :: PixelMapTarget
IToB :: PixelMapTarget
IToA :: PixelMapTarget
RToR :: PixelMapTarget
GToG :: PixelMapTarget
BToB :: PixelMapTarget
AToA :: PixelMapTarget
class Storable c => PixelMapComponent c
class PixelMap m where withNewPixelMap size act = allocaArray size $ \ p -> do { act p; components <- peekArray size p; newPixelMap components } withPixelMap m act = do { components <- getPixelMapComponents m; withArrayLen components act } newPixelMap elements = withNewPixelMap (length elements) $ flip pokeArray elements getPixelMapComponents m = withPixelMap m peekArray
withNewPixelMap :: (PixelMap m, PixelMapComponent c) => Int -> (Ptr c -> IO ()) -> IO (m c)
withPixelMap :: (PixelMap m, PixelMapComponent c) => m c -> (Int -> Ptr c -> IO a) -> IO a
newPixelMap :: (PixelMap m, PixelMapComponent c) => [c] -> IO (m c)
getPixelMapComponents :: (PixelMap m, PixelMapComponent c) => m c -> IO [c]
data GLpixelmap a
maxPixelMapTable :: GettableStateVar GLsizei
pixelMap :: (PixelMap m, PixelMapComponent c) => PixelMapTarget -> StateVar (m c)

-- | Convenience state variable
pixelMapIToRGBA :: PixelMapComponent c => StateVar [Color4 c]

-- | Convenience state variable
pixelMapRGBAToRGBA :: PixelMapComponent c => StateVar [Color4 c]
instance Eq (GLpixelmap a)
instance Ord (GLpixelmap a)
instance Show (GLpixelmap a)
instance PixelMap GLpixelmap
instance PixelMapComponent Float
instance PixelMapComponent Word32
instance PixelMapComponent Word16


-- | This module corresponds to chapter 2 (Initialization) of the GLU
--   specs.
module Graphics.Rendering.OpenGL.GLU.Initialization
gluVersion :: GettableStateVar String
gluExtensions :: GettableStateVar [String]
instance Eq StringName
instance Ord StringName
instance Show StringName


-- | This module corresponds to chapter 5 (Polygon Tessellation) of the GLU
--   specs.
module Graphics.Rendering.OpenGL.GLU.Tessellation

-- | The basic building block in tessellation is a 3D vertex with an
--   associated property, e.g. color, texture coordinates, etc.
data AnnotatedVertex v
AnnotatedVertex :: (Vertex3 GLdouble) -> v -> AnnotatedVertex v

-- | A complex contour, which can be self-intersecting and/or concave.
newtype ComplexContour v
ComplexContour :: [AnnotatedVertex v] -> ComplexContour v

-- | A complex (possibly concave) polygon, represented by one or more
--   complex and possibly intersecting contours.
newtype ComplexPolygon v
ComplexPolygon :: [ComplexContour v] -> ComplexPolygon v

-- | Four vertex properties (cf. <a>AnnotatedVertex</a>) with associated
--   weigths summing up to 1.0.
data WeightedProperties v
WeightedProperties :: (GLclampf, v) -> (GLclampf, v) -> (GLclampf, v) -> (GLclampf, v) -> WeightedProperties v

-- | A function combining given vertex properties into a property for a
--   newly generated vertex
type Combiner v = Vertex3 GLdouble -> WeightedProperties v -> v
data TessWinding
TessWindingOdd :: TessWinding
TessWindingNonzero :: TessWinding
TessWindingPositive :: TessWinding
TessWindingNegative :: TessWinding
TessWindingAbsGeqTwo :: TessWinding

-- | The relative tolerance under which two vertices can be combined (see
--   <a>Combiner</a>). Multiplication with the largest coordinate magnitude
--   of all polygon vertices yields the maximum distance between two
--   mergeable vertices.
--   
--   Note that merging is optional and the tolerance is only a hint.
type Tolerance = GLdouble

-- | A general tessellator type.
--   
--   Before tessellation of a complex polygon, all its vertices are
--   projected into a plane perpendicular to the given normal. If the given
--   normal is <tt>Normal3 0 0 0</tt>, a fitting plane of all vertices is
--   used.
type Tessellator p v = TessWinding -> Tolerance -> Normal3 GLdouble -> Combiner v -> ComplexPolygon v -> IO (p v)

-- | A simple, non-self-intersecting contour
newtype SimpleContour v
SimpleContour :: [AnnotatedVertex v] -> SimpleContour v

-- | The contours of a complex polygon, represented by one or more
--   non-intersecting simple contours
newtype PolygonContours v
PolygonContours :: [SimpleContour v] -> PolygonContours v
extractContours :: Storable v => Tessellator PolygonContours v

-- | A triangle vertex with additional information about the edge it begins
type TriangleVertex v = AnnotatedVertex (v, EdgeFlag)

-- | A triangle, represented by three triangle vertices
data Triangle v
Triangle :: (TriangleVertex v) -> (TriangleVertex v) -> (TriangleVertex v) -> Triangle v

-- | A triangulation of a complex polygon
newtype Triangulation v
Triangulation :: [Triangle v] -> Triangulation v
triangulate :: Storable v => Tessellator Triangulation v
data Primitive v
Primitive :: PrimitiveMode -> [AnnotatedVertex v] -> Primitive v
newtype SimplePolygon v
SimplePolygon :: [Primitive v] -> SimplePolygon v
tessellate :: Storable v => Tessellator SimplePolygon v
instance Eq TessWinding
instance Ord TessWinding
instance Show TessWinding
instance Eq v => Eq (AnnotatedVertex v)
instance Ord v => Ord (AnnotatedVertex v)
instance Eq v => Eq (ComplexContour v)
instance Ord v => Ord (ComplexContour v)
instance Eq v => Eq (ComplexPolygon v)
instance Ord v => Ord (ComplexPolygon v)
instance Eq v => Eq (WeightedProperties v)
instance Ord v => Ord (WeightedProperties v)
instance Eq v => Eq (SimpleContour v)
instance Ord v => Ord (SimpleContour v)
instance Eq v => Eq (PolygonContours v)
instance Ord v => Ord (PolygonContours v)
instance Eq v => Eq (Triangle v)
instance Ord v => Ord (Triangle v)
instance Eq v => Eq (Triangulation v)
instance Ord v => Ord (Triangulation v)
instance Eq v => Eq (Primitive v)
instance Ord v => Ord (Primitive v)
instance Eq v => Eq (SimplePolygon v)
instance Ord v => Ord (SimplePolygon v)
instance Storable v => Storable (AnnotatedVertex v)


-- | This module corresponds to section 2.11 (Coordinate Transformations)
--   of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.CoordTrans

-- | After clipping and division by <i>w</i>, depth coordinates range from
--   -1 to 1, corresponding to the near and far clipping planes.
--   <a>depthRange</a> specifies a linear mapping of the normalized depth
--   coordinates in this range to window depth coordinates. Regardless of
--   the actual depth buffer implementation, window coordinate depth values
--   are treated as though they range from 0 through 1 (like color
--   components). Thus, the values accepted by <a>depthRange</a> are both
--   clamped to this range before they are accepted.
--   
--   The initial setting of (0, 1) maps the near plane to 0 and the far
--   plane to 1. With this mapping, the depth buffer range is fully
--   utilized.
--   
--   It is not necessary that the near value be less than the far value.
--   Reverse mappings such as (1, 0) are acceptable.
depthRange :: StateVar (GLclampd, GLclampd)

-- | A 2-dimensional position, measured in pixels.
data Position
Position :: !GLint -> !GLint -> Position

-- | A 2-dimensional size, measured in pixels.
data Size
Size :: !GLsizei -> !GLsizei -> Size

-- | Controls the affine transformation from normalized device coordinates
--   to window coordinates. The viewport state variable consists of the
--   coordinates (<i>x</i>, <i>y</i>) of the lower left corner of the
--   viewport rectangle, (in pixels, initial value (0,0)), and the size
--   (<i>width</i>, <i>height</i>) of the viewport. When a GL context is
--   first attached to a window, <i>width</i> and <i>height</i> are set to
--   the dimensions of that window.
--   
--   Let (<i>xnd</i>, <i>ynd</i>) be normalized device coordinates. Then
--   the window coordinates (<i>xw</i>, <i>yw</i>) are computed as follows:
--   
--   <i>xw</i> = (<i>xnd</i> + 1) (<i>width</i> / 2) + <i>x</i>
--   
--   <i>yw</i> = (<i>ynd</i> + 1) (<i>heigth</i> / 2) + <i>y</i>
--   
--   Viewport width and height are silently clamped to a range that depends
--   on the implementation, see <a>maxViewportDims</a>.
viewport :: StateVar (Position, Size)

-- | The implementation-dependent maximum viewport width and height.
maxViewportDims :: GettableStateVar Size

-- | A matrix stack.
data MatrixMode

-- | The modelview matrix stack of the specified vertex unit.
Modelview :: GLsizei -> MatrixMode

-- | The projection matrix stack.
Projection :: MatrixMode

-- | The texture matrix stack.
Texture :: MatrixMode

-- | The color matrix stack.
Color :: MatrixMode

-- | The matrix palette stack.
MatrixPalette :: MatrixMode

-- | Controls which matrix stack is the target for subsequent matrix
--   operations. The initial value is (<a>Modelview</a> 0).
matrixMode :: StateVar MatrixMode

-- | A one-dimensional vector.
newtype Vector1 a
Vector1 :: a -> Vector1 a

-- | A two-dimensional vector.
data Vector2 a
Vector2 :: !a -> !a -> Vector2 a

-- | A three-dimensional vector.
data Vector3 a
Vector3 :: !a -> !a -> !a -> Vector3 a

-- | A four-dimensional vector.
data Vector4 a
Vector4 :: !a -> !a -> !a -> !a -> Vector4 a
data MatrixOrder
ColumnMajor :: MatrixOrder
RowMajor :: MatrixOrder
class Storable c => MatrixComponent c
rotate :: MatrixComponent c => c -> Vector3 c -> IO ()
translate :: MatrixComponent c => Vector3 c -> IO ()
scale :: MatrixComponent c => c -> c -> c -> IO ()
class Matrix m where withNewMatrix order act = allocaArray 16 $ \ p -> do { act p; components <- peekArray 16 p; newMatrix order components } withMatrix mat act = do { components <- getMatrixComponents ColumnMajor mat; withArray components $ act ColumnMajor } newMatrix order components = withNewMatrix order $ flip pokeArray (take 16 components) getMatrixComponents desiredOrder mat = withMatrix mat $ \ order p -> if desiredOrder == order then peekArray 16 p else mapM (peekElemOff p) [0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15]
withNewMatrix :: (Matrix m, MatrixComponent c) => MatrixOrder -> (Ptr c -> IO ()) -> IO (m c)
withMatrix :: (Matrix m, MatrixComponent c) => m c -> (MatrixOrder -> Ptr c -> IO a) -> IO a
newMatrix :: (Matrix m, MatrixComponent c) => MatrixOrder -> [c] -> IO (m c)
getMatrixComponents :: (Matrix m, MatrixComponent c) => MatrixOrder -> m c -> IO [c]

-- | <i>Deprecated: use `matrix' instead</i>
currentMatrix :: (Matrix m, MatrixComponent c) => StateVar (m c)
matrix :: (Matrix m, MatrixComponent c) => Maybe MatrixMode -> StateVar (m c)
multMatrix :: (Matrix m, MatrixComponent c) => m c -> IO ()
data GLmatrix a
loadIdentity :: IO ()
ortho :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
frustum :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
depthClamp :: StateVar Capability
activeTexture :: StateVar TextureUnit

-- | Push the current matrix stack down by one, duplicating the current
--   matrix, excute the given action, and pop the current matrix stack,
--   replacing the current matrix with the one below it on the stack (i.e.
--   restoring it to its previous state). The returned value is that of the
--   given action. Note that a round-trip to the server is probably
--   required. For a more efficient version, see
--   <a>unsafePreservingMatrix</a>.
preservingMatrix :: IO a -> IO a

-- | A more efficient, but potentially dangerous version of
--   <a>preservingMatrix</a>: The given action is not allowed to throw an
--   exception or change the current matrix mode permanently.
unsafePreservingMatrix :: IO a -> IO a
stackDepth :: Maybe MatrixMode -> GettableStateVar GLsizei
maxStackDepth :: MatrixMode -> GettableStateVar GLsizei

-- | If <a>rescaleNormal</a> contains <a>Enabled</a>, normal vectors
--   specified with <a>normal</a> are scaled by a scaling factor derived
--   from the modelview matrix. <a>rescaleNormal</a> requires that the
--   originally specified normals were of unit length, and that the
--   modelview matrix contains only uniform scales for proper results. The
--   initial value of <a>rescaleNormal</a> is <a>Disabled</a>.
rescaleNormal :: StateVar Capability

-- | If <a>normalize</a> contains <a>Enabled</a>, normal vectors specified
--   with <a>normal</a> are scaled to unit length after transformation. The
--   initial value of <a>normalize</a> is <a>Disabled</a>.
normalize :: StateVar Capability
data Plane a
Plane :: !a -> !a -> !a -> !a -> Plane a
data TextureCoordName
S :: TextureCoordName
T :: TextureCoordName
R :: TextureCoordName
Q :: TextureCoordName
data TextureGenMode
EyeLinear :: (Plane GLdouble) -> TextureGenMode
ObjectLinear :: (Plane GLdouble) -> TextureGenMode
SphereMap :: TextureGenMode
NormalMap :: TextureGenMode
ReflectionMap :: TextureGenMode
textureGenMode :: TextureCoordName -> StateVar (Maybe TextureGenMode)
instance Eq Position
instance Ord Position
instance Show Position
instance Eq Size
instance Ord Size
instance Show Size
instance Eq MatrixMode
instance Ord MatrixMode
instance Show MatrixMode
instance Eq MatrixOrder
instance Ord MatrixOrder
instance Show MatrixOrder
instance Eq (GLmatrix a)
instance Ord (GLmatrix a)
instance Show (GLmatrix a)
instance Eq a => Eq (Plane a)
instance Ord a => Ord (Plane a)
instance Show a => Show (Plane a)
instance Eq TextureCoordName
instance Ord TextureCoordName
instance Show TextureCoordName
instance Eq TextureGenMode
instance Ord TextureGenMode
instance Show TextureGenMode
instance Storable a => Storable (Plane a)
instance Matrix GLmatrix
instance MatrixComponent Double
instance MatrixComponent Float


-- | This module corresponds to section 3.7 (Bitmaps) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Bitmaps
bitmap :: Size -> (Vertex2 GLfloat) -> (Vector2 GLfloat) -> Ptr a -> IO ()


-- | This module corresponds to a part of section 3.6.4 (Rasterization of
--   Pixel Rectangles) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Rasterization
data PixelData a
PixelData :: PixelFormat -> DataType -> (Ptr a) -> PixelData a
data PixelFormat
ColorIndex :: PixelFormat
StencilIndex :: PixelFormat
DepthComponent :: PixelFormat
Red :: PixelFormat
Green :: PixelFormat
Blue :: PixelFormat
Alpha :: PixelFormat
RGB :: PixelFormat
RGBA :: PixelFormat
Luminance :: PixelFormat
LuminanceAlpha :: PixelFormat
ABGR :: PixelFormat
BGR :: PixelFormat
BGRA :: PixelFormat
CMYK :: PixelFormat
CMYKA :: PixelFormat
FourTwoTwo :: PixelFormat
FourTwoTwoRev :: PixelFormat
FourTwoTwoAverage :: PixelFormat
FourTwoTwoRevAverage :: PixelFormat
YCBCR422 :: PixelFormat
DepthStencil :: PixelFormat
drawPixels :: Size -> PixelData a -> IO ()
pixelZoom :: StateVar (GLfloat, GLfloat)


-- | This module corresponds to chapter 4 (Matrix Manipulation) of the GLU
--   specs.
module Graphics.Rendering.OpenGL.GLU.Matrix
ortho2D :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
perspective :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> IO ()
lookAt :: Vertex3 GLdouble -> Vertex3 GLdouble -> Vector3 GLdouble -> IO ()
pickMatrix :: (GLdouble, GLdouble) -> (GLdouble, GLdouble) -> (Position, Size) -> IO ()
project :: Matrix m => Vertex3 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> IO (Vertex3 GLdouble)
unProject :: Matrix m => Vertex3 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> IO (Vertex3 GLdouble)
unProject4 :: Matrix m => Vertex4 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> GLclampd -> GLclampd -> IO (Vertex4 GLdouble)


-- | This module corresponds to section 2.8 (Vertex Arrays) of the OpenGL
--   2.1 specs.
module Graphics.Rendering.OpenGL.GL.VertexArrays
type NumComponents = GLint
data DataType
UnsignedByte :: DataType
Byte :: DataType
UnsignedShort :: DataType
Short :: DataType
UnsignedInt :: DataType
Int :: DataType
HalfFloat :: DataType
Float :: DataType
UnsignedByte332 :: DataType
UnsignedByte233Rev :: DataType
UnsignedShort565 :: DataType
UnsignedShort565Rev :: DataType
UnsignedShort4444 :: DataType
UnsignedShort4444Rev :: DataType
UnsignedShort5551 :: DataType
UnsignedShort1555Rev :: DataType
UnsignedInt8888 :: DataType
UnsignedInt8888Rev :: DataType
UnsignedInt1010102 :: DataType
UnsignedInt2101010Rev :: DataType
UnsignedInt248 :: DataType
UnsignedInt10f11f11fRev :: DataType
UnsignedInt5999Rev :: DataType
Float32UnsignedInt248Rev :: DataType
Bitmap :: DataType
UnsignedShort88 :: DataType
UnsignedShort88Rev :: DataType
Double :: DataType
TwoBytes :: DataType
ThreeBytes :: DataType
FourBytes :: DataType
type Stride = GLsizei
data VertexArrayDescriptor a
VertexArrayDescriptor :: !NumComponents -> !DataType -> !Stride -> !Ptr a -> VertexArrayDescriptor a
data ClientArrayType
VertexArray :: ClientArrayType
NormalArray :: ClientArrayType
ColorArray :: ClientArrayType
IndexArray :: ClientArrayType
TextureCoordArray :: ClientArrayType
EdgeFlagArray :: ClientArrayType
FogCoordArray :: ClientArrayType
SecondaryColorArray :: ClientArrayType
MatrixIndexArray :: ClientArrayType
arrayPointer :: ClientArrayType -> StateVar (VertexArrayDescriptor a)
data InterleavedArrays
V2f :: InterleavedArrays
V3f :: InterleavedArrays
C4ubV2f :: InterleavedArrays
C4ubV3f :: InterleavedArrays
C3fV3f :: InterleavedArrays
N3fV3f :: InterleavedArrays
C4fN3fV3f :: InterleavedArrays
T2fV3f :: InterleavedArrays
T4fV4f :: InterleavedArrays
T2fC4ubV3f :: InterleavedArrays
T2fC3fV3f :: InterleavedArrays
T2fN3fV3f :: InterleavedArrays
T2fC4fN3fV3f :: InterleavedArrays
T4fC4fN3fV4f :: InterleavedArrays
interleavedArrays :: InterleavedArrays -> Stride -> Ptr a -> IO ()
clientState :: ClientArrayType -> StateVar Capability
clientActiveTexture :: StateVar TextureUnit
type ArrayIndex = GLint
type NumArrayIndices = GLsizei
type NumIndexBlocks = GLsizei
arrayElement :: ArrayIndex -> IO ()
drawArrays :: PrimitiveMode -> ArrayIndex -> NumArrayIndices -> IO ()
multiDrawArrays :: PrimitiveMode -> Ptr ArrayIndex -> Ptr NumArrayIndices -> NumIndexBlocks -> IO ()
drawElements :: PrimitiveMode -> NumArrayIndices -> DataType -> Ptr a -> IO ()
multiDrawElements :: PrimitiveMode -> Ptr NumArrayIndices -> DataType -> Ptr (Ptr a) -> NumIndexBlocks -> IO ()
drawRangeElements :: PrimitiveMode -> (ArrayIndex, ArrayIndex) -> NumArrayIndices -> DataType -> Ptr a -> IO ()
maxElementsVertices :: GettableStateVar NumArrayIndices
maxElementsIndices :: GettableStateVar NumArrayIndices
lockArrays :: StateVar (Maybe (ArrayIndex, NumArrayIndices))
primitiveRestartIndex :: StateVar (Maybe ArrayIndex)
vertexAttribPointer :: AttribLocation -> StateVar (IntegerHandling, VertexArrayDescriptor a)
vertexAttribArray :: AttribLocation -> StateVar Capability
instance Eq (VertexArrayDescriptor a)
instance Ord (VertexArrayDescriptor a)
instance Show (VertexArrayDescriptor a)
instance Eq ClientArrayType
instance Ord ClientArrayType
instance Show ClientArrayType
instance Eq InterleavedArrays
instance Ord InterleavedArrays
instance Show InterleavedArrays


-- | This module corresponds to section 2.9 (Buffer Objects) of the OpenGL
--   2.1 specs.
module Graphics.Rendering.OpenGL.GL.BufferObjects

-- | An <a>ObjectName</a> corresponds to the general OpenGL notion of an
--   explicitly handled object name, e.g. a display list name, a texture
--   object name, a buffer object name, etc.
class ObjectName a
genObjectNames :: ObjectName a => Int -> IO [a]
deleteObjectNames :: ObjectName a => [a] -> IO ()
isObjectName :: ObjectName a => a -> IO Bool
newtype BufferObject
BufferObject :: GLuint -> BufferObject
data BufferTarget
ArrayBuffer :: BufferTarget
CopyReadBuffer :: BufferTarget
CopyWriteBuffer :: BufferTarget
ElementArrayBuffer :: BufferTarget
PixelPackBuffer :: BufferTarget
PixelUnpackBuffer :: BufferTarget
bindBuffer :: BufferTarget -> StateVar (Maybe BufferObject)
arrayBufferBinding :: ClientArrayType -> GettableStateVar (Maybe BufferObject)
vertexAttribArrayBufferBinding :: AttribLocation -> GettableStateVar (Maybe BufferObject)
data BufferUsage
StreamDraw :: BufferUsage
StreamRead :: BufferUsage
StreamCopy :: BufferUsage
StaticDraw :: BufferUsage
StaticRead :: BufferUsage
StaticCopy :: BufferUsage
DynamicDraw :: BufferUsage
DynamicRead :: BufferUsage
DynamicCopy :: BufferUsage
bufferData :: BufferTarget -> StateVar (GLsizeiptr, Ptr a, BufferUsage)
data TransferDirection
ReadFromBuffer :: TransferDirection
WriteToBuffer :: TransferDirection
bufferSubData :: BufferTarget -> TransferDirection -> GLintptr -> GLsizeiptr -> Ptr a -> IO ()
data BufferAccess
ReadOnly :: BufferAccess
WriteOnly :: BufferAccess
ReadWrite :: BufferAccess
data MappingFailure
MappingFailed :: MappingFailure
UnmappingFailed :: MappingFailure

-- | Convenience function for an exception-safe combination of
--   <a>mapBuffer</a> and <a>unmapBuffer</a>.
withMappedBuffer :: BufferTarget -> BufferAccess -> (Ptr a -> IO b) -> (MappingFailure -> IO b) -> IO b
mapBuffer :: BufferTarget -> BufferAccess -> IO (Maybe (Ptr a))
unmapBuffer :: BufferTarget -> IO Bool
bufferAccess :: BufferTarget -> GettableStateVar BufferAccess
bufferMapped :: BufferTarget -> GettableStateVar Bool
instance Eq BufferObject
instance Ord BufferObject
instance Show BufferObject
instance Eq BufferTarget
instance Ord BufferTarget
instance Show BufferTarget
instance Eq BufferUsage
instance Ord BufferUsage
instance Show BufferUsage
instance Eq BufferAccess
instance Ord BufferAccess
instance Show BufferAccess
instance Eq TransferDirection
instance Ord TransferDirection
instance Show TransferDirection
instance Eq MappingFailure
instance Ord MappingFailure
instance Show MappingFailure
instance ObjectName BufferObject


-- | This module corresponds to sections 2.15 (Vertex Shaders) and section
--   3.11 (Fragment Shaders) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Shaders
class (Eq s, Ord s, Show s, ObjectName s) => Shader s
data VertexShader
data FragmentShader
shaderDeleteStatus :: Shader s => s -> GettableStateVar Bool
shaderSource :: Shader s => s -> StateVar [String]
compileShader :: Shader s => s -> IO ()
compileStatus :: Shader s => s -> GettableStateVar Bool
shaderInfoLog :: Shader s => s -> GettableStateVar String
data Program
programDeleteStatus :: Program -> GettableStateVar Bool
attachedShaders :: Program -> StateVar ([VertexShader], [FragmentShader])
linkProgram :: Program -> IO ()
linkStatus :: Program -> GettableStateVar Bool
programInfoLog :: Program -> GettableStateVar String
validateProgram :: Program -> IO ()
validateStatus :: Program -> GettableStateVar Bool
currentProgram :: StateVar (Maybe Program)
attribLocation :: Program -> String -> StateVar AttribLocation
data VariableType
Float' :: VariableType
FloatVec2 :: VariableType
FloatVec3 :: VariableType
FloatVec4 :: VariableType
Int' :: VariableType
IntVec2 :: VariableType
IntVec3 :: VariableType
IntVec4 :: VariableType
UnsignedInt' :: VariableType
UnsignedIntVec2 :: VariableType
UnsignedIntVec3 :: VariableType
UnsignedIntVec4 :: VariableType
Bool :: VariableType
BoolVec2 :: VariableType
BoolVec3 :: VariableType
BoolVec4 :: VariableType
FloatMat2 :: VariableType
FloatMat3 :: VariableType
FloatMat4 :: VariableType
FloatMat2x3 :: VariableType
FloatMat2x4 :: VariableType
FloatMat3x2 :: VariableType
FloatMat3x4 :: VariableType
FloatMat4x2 :: VariableType
FloatMat4x3 :: VariableType
Sampler1D :: VariableType
Sampler2D :: VariableType
Sampler3D :: VariableType
SamplerCube :: VariableType
Sampler1DShadow :: VariableType
Sampler2DShadow :: VariableType
Sampler1DArray :: VariableType
Sampler2DArray :: VariableType
Sampler1DArrayShadow :: VariableType
Sampler2DArrayShadow :: VariableType
SamplerCubeShadow :: VariableType
Sampler2DRect :: VariableType
Sampler2DRectShadow :: VariableType
IntSampler1D :: VariableType
IntSampler2D :: VariableType
IntSampler3D :: VariableType
IntSamplerCube :: VariableType
IntSampler1DArray :: VariableType
IntSampler2DArray :: VariableType
UnsignedIntSampler1D :: VariableType
UnsignedIntSampler2D :: VariableType
UnsignedIntSampler3D :: VariableType
UnsignedIntSamplerCube :: VariableType
UnsignedIntSampler1DArray :: VariableType
UnsignedIntSampler2DArray :: VariableType
activeAttribs :: Program -> GettableStateVar [(GLint, VariableType, String)]
data UniformLocation
uniformLocation :: Program -> String -> GettableStateVar UniformLocation
activeUniforms :: Program -> GettableStateVar [(GLint, VariableType, String)]
class Uniform a
uniform :: Uniform a => UniformLocation -> StateVar a
uniformv :: Uniform a => UniformLocation -> GLsizei -> Ptr a -> IO ()
class Storable a => UniformComponent a

-- | Contains the number of hardware units that can be used to access
--   texture maps from the vertex processor. The minimum legal value is 0.
maxVertexTextureImageUnits :: GettableStateVar GLsizei

-- | Contains the total number of hardware units that can be used to access
--   texture maps from the fragment processor. The minimum legal value is
--   2.
maxTextureImageUnits :: GettableStateVar GLsizei

-- | Contains the total number of hardware units that can be used to access
--   texture maps from the vertex processor and the fragment processor
--   combined. Note: If the vertex shader and the fragment processing stage
--   access the same texture image unit, then that counts as using two
--   texture image units. The minimum legal value is 2.
maxCombinedTextureImageUnits :: GettableStateVar GLsizei

-- | Contains the number of texture coordinate sets that are available. The
--   minimum legal value is 2.
maxTextureCoords :: GettableStateVar GLsizei

-- | Contains the number of individual components (i.e., floating-point,
--   integer or boolean values) that are available for vertex shader
--   uniform variables. The minimum legal value is 512.
maxVertexUniformComponents :: GettableStateVar GLsizei

-- | Contains the number of individual components (i.e., floating-point,
--   integer or boolean values) that are available for fragment shader
--   uniform variables. The minimum legal value is 64.
maxFragmentUniformComponents :: GettableStateVar GLsizei

-- | Contains the number of active vertex attributes that are available.
--   The minimum legal value is 16.
maxVertexAttribs :: GettableStateVar GLsizei

-- | Contains the number of individual floating-point values available for
--   varying variables. The minimum legal value is 32.
maxVaryingFloats :: GettableStateVar GLsizei
instance Eq VertexShader
instance Ord VertexShader
instance Show VertexShader
instance Eq FragmentShader
instance Ord FragmentShader
instance Show FragmentShader
instance Eq Program
instance Ord Program
instance Show Program
instance Eq VariableType
instance Ord VariableType
instance Show VariableType
instance Eq UniformLocation
instance Ord UniformLocation
instance Show UniformLocation
instance UniformComponent a => Uniform (Index1 a)
instance UniformComponent a => Uniform (Color4 a)
instance UniformComponent a => Uniform (Color3 a)
instance UniformComponent a => Uniform (FogCoord1 a)
instance UniformComponent a => Uniform (Normal3 a)
instance UniformComponent a => Uniform (TexCoord4 a)
instance UniformComponent a => Uniform (TexCoord3 a)
instance UniformComponent a => Uniform (TexCoord2 a)
instance UniformComponent a => Uniform (TexCoord1 a)
instance UniformComponent a => Uniform (Vertex4 a)
instance UniformComponent a => Uniform (Vertex3 a)
instance UniformComponent a => Uniform (Vertex2 a)
instance UniformComponent Float
instance UniformComponent Word32
instance UniformComponent Int32
instance ObjectName Program
instance ObjectName FragmentShader
instance ObjectName VertexShader
instance Shader FragmentShader
instance Shader VertexShader


-- | This module corresponds to section 5.4 (Display Lists) of the OpenGL
--   2.1 specs.
module Graphics.Rendering.OpenGL.GL.DisplayLists
newtype DisplayList
DisplayList :: GLuint -> DisplayList
data ListMode
Compile :: ListMode
CompileAndExecute :: ListMode
defineList :: DisplayList -> ListMode -> IO a -> IO a
defineNewList :: ListMode -> IO a -> IO DisplayList
listIndex :: GettableStateVar (Maybe DisplayList)
listMode :: GettableStateVar ListMode
maxListNesting :: GettableStateVar GLsizei
callList :: DisplayList -> IO ()
callLists :: GLsizei -> DataType -> Ptr a -> IO ()
listBase :: StateVar DisplayList

-- | <i>Deprecated: use `genObjectNames' instead</i>
genLists :: GLsizei -> IO [DisplayList]

-- | <i>Deprecated: use `deleteObjectNames' instead</i>
deleteLists :: [DisplayList] -> IO ()

-- | <i>Deprecated: use `isObjectName' instead</i>
isList :: DisplayList -> IO Bool
instance Eq DisplayList
instance Ord DisplayList
instance Show DisplayList
instance Eq ListMode
instance Ord ListMode
instance Show ListMode
instance ObjectName DisplayList


-- | This module corresponds to section 2.12 (Clipping) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Clipping
newtype ClipPlaneName
ClipPlaneName :: GLsizei -> ClipPlaneName
clipPlane :: ClipPlaneName -> StateVar (Maybe (Plane GLdouble))
maxClipPlanes :: GettableStateVar GLsizei
instance Eq ClipPlaneName
instance Ord ClipPlaneName
instance Show ClipPlaneName


-- | This module corresponds to section 2.14 (Colors and Coloring) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Colors
lighting :: StateVar Capability
newtype Light
Light :: GLsizei -> Light
light :: Light -> StateVar Capability
maxLights :: GettableStateVar GLsizei
data FrontFaceDirection
CW :: FrontFaceDirection
CCW :: FrontFaceDirection
frontFace :: StateVar FrontFaceDirection
data Face
Front :: Face
Back :: Face
FrontAndBack :: Face
materialAmbient :: Face -> StateVar (Color4 GLfloat)
materialDiffuse :: Face -> StateVar (Color4 GLfloat)
materialAmbientAndDiffuse :: Face -> StateVar (Color4 GLfloat)
materialSpecular :: Face -> StateVar (Color4 GLfloat)
materialEmission :: Face -> StateVar (Color4 GLfloat)
materialShininess :: Face -> StateVar GLfloat
maxShininess :: GettableStateVar GLfloat
materialColorIndexes :: Face -> StateVar (Index1 GLint, Index1 GLint, Index1 GLint)
ambient :: Light -> StateVar (Color4 GLfloat)
diffuse :: Light -> StateVar (Color4 GLfloat)
specular :: Light -> StateVar (Color4 GLfloat)
position :: Light -> StateVar (Vertex4 GLfloat)
spotDirection :: Light -> StateVar (Normal3 GLfloat)
spotExponent :: Light -> StateVar GLfloat
maxSpotExponent :: GettableStateVar GLfloat
spotCutoff :: Light -> StateVar GLfloat
attenuation :: Light -> StateVar (GLfloat, GLfloat, GLfloat)
lightModelAmbient :: StateVar (Color4 GLfloat)
lightModelLocalViewer :: StateVar Capability
lightModelTwoSide :: StateVar Capability
vertexProgramTwoSide :: StateVar Capability
data LightModelColorControl
SingleColor :: LightModelColorControl
SeparateSpecularColor :: LightModelColorControl
lightModelColorControl :: StateVar LightModelColorControl
data ColorMaterialParameter
Ambient :: ColorMaterialParameter
Diffuse :: ColorMaterialParameter
Specular :: ColorMaterialParameter
Emission :: ColorMaterialParameter
AmbientAndDiffuse :: ColorMaterialParameter
colorMaterial :: StateVar (Maybe (Face, ColorMaterialParameter))
data ShadingModel
Flat :: ShadingModel
Smooth :: ShadingModel
shadeModel :: StateVar ShadingModel
instance Eq Light
instance Ord Light
instance Show Light
instance Eq FrontFaceDirection
instance Ord FrontFaceDirection
instance Show FrontFaceDirection
instance Eq LightModelColorControl
instance Ord LightModelColorControl
instance Show LightModelColorControl
instance Eq ColorMaterialParameter
instance Ord ColorMaterialParameter
instance Show ColorMaterialParameter
instance Eq ShadingModel
instance Ord ShadingModel
instance Show ShadingModel


-- | This module corresponds to chapter 6 (Quadrics) of the GLU specs.
module Graphics.Rendering.OpenGL.GLU.Quadrics
type QuadricNormal = Maybe ShadingModel
data QuadricTexture
NoTextureCoordinates :: QuadricTexture
GenerateTextureCoordinates :: QuadricTexture
data QuadricOrientation
Outside :: QuadricOrientation
Inside :: QuadricOrientation
data QuadricDrawStyle
PointStyle :: QuadricDrawStyle
LineStyle :: QuadricDrawStyle
FillStyle :: QuadricDrawStyle
SilhouetteStyle :: QuadricDrawStyle
data QuadricStyle
QuadricStyle :: QuadricNormal -> QuadricTexture -> QuadricOrientation -> QuadricDrawStyle -> QuadricStyle
type Radius = GLdouble
type Height = GLdouble
type Angle = GLdouble
type Slices = GLint
type Stacks = GLint
type Loops = GLint
data QuadricPrimitive
Sphere :: Radius -> Slices -> Stacks -> QuadricPrimitive
Cylinder :: Radius -> Radius -> Height -> Slices -> Stacks -> QuadricPrimitive
Disk :: Radius -> Radius -> Slices -> Loops -> QuadricPrimitive
PartialDisk :: Radius -> Radius -> Slices -> Loops -> Angle -> Angle -> QuadricPrimitive
renderQuadric :: QuadricStyle -> QuadricPrimitive -> IO ()
instance Eq QuadricDrawStyle
instance Ord QuadricDrawStyle
instance Show QuadricDrawStyle
instance Eq QuadricCallback
instance Ord QuadricCallback
instance Show QuadricCallback
instance Eq QuadricOrientation
instance Ord QuadricOrientation
instance Show QuadricOrientation
instance Eq QuadricTexture
instance Ord QuadricTexture
instance Eq QuadricStyle
instance Ord QuadricStyle
instance Eq QuadricPrimitive
instance Ord QuadricPrimitive
instance Eq QuadricObj


-- | This module corresponds to section 3.9 (Color Sum) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.ColorSum
colorSum :: StateVar Capability


-- | This module corresponds to section 3.10 (Fog) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Fog
fog :: StateVar Capability
data FogMode
Linear :: GLfloat -> GLfloat -> FogMode
Exp :: GLfloat -> FogMode
Exp2 :: GLfloat -> FogMode
fogMode :: StateVar FogMode
fogColor :: StateVar (Color4 GLfloat)
fogIndex :: StateVar (Index1 GLint)
data FogCoordSrc
FogCoord :: FogCoordSrc
FragmentDepth :: FogCoordSrc
fogCoordSrc :: StateVar FogCoordSrc
data FogDistanceMode
EyeRadial :: FogDistanceMode
EyePlaneSigned :: FogDistanceMode
EyePlaneAbsolute :: FogDistanceMode
fogDistanceMode :: StateVar FogDistanceMode
instance Eq FogMode
instance Ord FogMode
instance Show FogMode
instance Eq FogCoordSrc
instance Ord FogCoordSrc
instance Show FogCoordSrc
instance Eq FogDistanceMode
instance Ord FogDistanceMode
instance Show FogDistanceMode


-- | This module corresponds to section 4.2 (Whole Framebuffer Operations)
--   of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Framebuffer

-- | The implementation and context dependent number of auxiliary buffers.
auxBuffers :: GettableStateVar GLsizei

-- | <a>True</a> if front and back buffers exist.
doubleBuffer :: GettableStateVar Bool

-- | <a>True</a> if left and right buffers exist.
stereoBuffer :: GettableStateVar Bool
rgbaBits :: GettableStateVar (Color4 GLsizei)
stencilBits :: GettableStateVar GLsizei
depthBits :: GettableStateVar GLsizei
accumBits :: GettableStateVar (Color4 GLsizei)
rgbaSignedComponents :: GettableStateVar (Color4 Bool)

-- | The set of color buffers which are selected for reading and writing.
data BufferMode

-- | No color buffers are selected.
NoBuffers :: BufferMode

-- | Only the front left color buffer is selected.
FrontLeftBuffer :: BufferMode

-- | Only the front right color buffer is selected.
FrontRightBuffer :: BufferMode

-- | Only the back left color buffer is selected.
BackLeftBuffer :: BufferMode

-- | Only the back right color buffer is selected.
BackRightBuffer :: BufferMode

-- | Only the front left and front right color buffers are selected. If
--   there is no front right color buffer, only the front left color buffer
--   is selected.
FrontBuffers :: BufferMode

-- | Only the back left and back right color buffers are selected. If there
--   is no back right color buffer, only the back left color buffer is
--   selected.
BackBuffers :: BufferMode

-- | Only the front left and back left color buffers are selected. If there
--   is no back left color buffer, only the front left color buffer is
--   selected.
LeftBuffers :: BufferMode

-- | Only the front right and back right color buffers are selected. If
--   there is no back right color buffer, only the front right color buffer
--   is selected.
RightBuffers :: BufferMode

-- | All the front and back color buffers (front left, front right, back
--   left, back right) are selected. If there are no back color buffers,
--   only the front left and front right color buffers are selected. If
--   there are no right color buffers, only the front left and back left
--   color buffers are selected. If there are no right or back color
--   buffers, only the front left color buffer is selected.
FrontAndBackBuffers :: BufferMode

-- | Only the given auxiliary color buffer no. <i>i</i> is selected.
AuxBuffer :: GLsizei -> BufferMode

-- | When colors are written to the framebuffer, they are written into the
--   color buffers specified by <a>drawBuffer</a>.
--   
--   If more than one color buffer is selected for drawing, then blending
--   or logical operations are computed and applied independently for each
--   color buffer and can produce different results in each buffer.
--   
--   Monoscopic contexts include only left buffers, and stereoscopic
--   contexts include both left and right buffers. Likewise,
--   single-buffered contexts include only front buffers, and
--   double-buffered contexts include both front and back buffers. The
--   context is selected at GL initialization.
--   
--   The initial value is <a>FrontBuffers</a> for single-buffered contexts,
--   and <a>BackBuffers</a> for double-buffered contexts.
drawBuffer :: StateVar BufferMode

-- | <a>drawBuffers</a> defines the draw buffers to which all fragment
--   colors are written. The draw buffers being defined correspond in order
--   to the respective fragment colors. The draw buffer for fragment colors
--   beyond those specified is set to <a>NoBuffers</a>.
--   
--   Except for <a>NoBuffers</a>, a buffer may not appear more then once in
--   the given list. Specifying a buffer more then once will result in an
--   <a>InvalidOperation</a>.
--   
--   If fixed-function fragment shading is being performed,
--   <a>drawBuffers</a> specifies a set of draw buffers into which the
--   fragment color is written.
--   
--   If a fragment shader writes to <tt>gl_FragColor</tt>,
--   <a>drawBuffers</a> specifies a set of draw buffers into which the
--   single fragment color defined by <tt>gl_FragColor</tt> is written. If
--   a fragment shader writes to <tt>gl_FragData</tt>, <a>drawBuffers</a>
--   specifies a set of draw buffers into which each of the multiple
--   fragment colors defined by <tt>gl_FragData</tt> are separately
--   written. If a fragment shader writes to neither <tt>gl_FragColor</tt>
--   nor <tt>gl_FragData</tt>, the values of the fragment colors following
--   shader execution are undefined, and may differ for each fragment
--   color.
drawBuffers :: StateVar [BufferMode]

-- | Contains the maximum number of buffers that can activated via
--   <a>drawBuffers</a> or which can be simultaneously written into from
--   within a fragment shader using the special output variable array
--   <tt>gl_FragData</tt>. This constant effectively defines the size of
--   the <tt>gl_FragData</tt> array. The minimum legal value is 1.
maxDrawBuffers :: GettableStateVar GLsizei

-- | Controls the writing of individual bits in the color index buffers.
--   The least significant <i>n</i> bits of its value, where <i>n</i> is
--   the number of bits in a color index buffer, specify a mask. Where a 1
--   appears in the mask, it is possible to write to the corresponding bit
--   in the color index buffer (or buffers). Where a 0 appears, the
--   corresponding bit is write-protected.
--   
--   This mask is used only in color index mode, and it affects only the
--   buffers currently selected for writing (see <a>drawBuffer</a>).
--   Initially, all bits are enabled for writing.
indexMask :: StateVar GLuint

-- | Controls whether the individual color components in the framebuffer
--   can or cannot be written. If the red flag is <tt>Disabled</tt>, for
--   example, no change is made to the red component of any pixel in any of
--   the color buffers, regardless of the drawing operation attempted.
--   Initially, all color components can be written.
--   
--   Changes to individual bits of components cannot be controlled. Rather,
--   changes are either enabled or disabled for entire color components.
--   Furthermore, this mask is used only in RGBA mode.
colorMask :: StateVar (Color4 Capability)

-- | Controls the writing of individual bits in the stencil planes. The
--   least significant <i>n</i> bits of its value, where <i>n</i> is the
--   number of bits in the stencil buffer, specify a mask. Where a 1
--   appears in the mask, it is possible to write to the corresponding bit
--   in the stencil buffer. Where a 0 appears, the corresponding bit is
--   write-protected. Initially, all bits are enabled for writing.
stencilMask :: StateVar GLuint
stencilMaskSeparate :: Face -> SettableStateVar GLuint

-- | Controls whether the depth buffer is enabled for writing. The initial
--   state is <tt>Enabled</tt>.
depthMask :: StateVar Capability

-- | The buffers which can be cleared with <a>clear</a>.
data ClearBuffer

-- | The buffers currently enabled for color writing.
ColorBuffer :: ClearBuffer

-- | The accumulation buffer.
AccumBuffer :: ClearBuffer

-- | The stencil buffer.
StencilBuffer :: ClearBuffer

-- | The depth buffer.
DepthBuffer :: ClearBuffer

-- | Set the bitplane area of the window to values previously selected by
--   <a>clearColor</a>, <a>clearIndex</a>, <a>clearDepth</a>,
--   <a>clearStencil</a>, and <a>clearAccum</a>. Multiple color buffers can
--   be cleared simultaneously by selecting more than one buffer at a time
--   using <a>drawBuffer</a>.
--   
--   The pixel ownership test, the scissor test, dithering, and the buffer
--   writemasks affect the operation of <a>clear</a>. The scissor box
--   bounds the cleared region. Alpha function, blend function, logical
--   operation, stenciling, texure mapping, and depth-buffering are ignored
--   by <a>clear</a>.
--   
--   <a>clear</a> takes a list of buffers, indicating which buffers are to
--   be cleared. If a buffer is not present, then a <a>clear</a> directed
--   at that buffer has no effect.
--   
--   The value to which each buffer is cleared depends on the setting of
--   the clear value for that buffer.
clear :: [ClearBuffer] -> IO ()

-- | Controls the red, green, blue, and alpha values used by <a>clear</a>
--   to clear the color buffers. Values written into <a>clearColor</a> are
--   clamped to the range [0, 1]. Initially, all values are 0.
clearColor :: StateVar (Color4 GLclampf)

-- | Controls the index <i>c</i> used by <a>clear</a> to clear the color
--   index buffers. <i>c</i> is not clamped. Rather, <i>c</i> is converted
--   to a fixed-point value with unspecified precision to the right of the
--   binary point. The integer part of this value is then masked with
--   2^<i>m</i>-1, where <i>m</i> is the number of bits in a color index
--   stored in the framebuffer. Initially, the value is 0.
clearIndex :: StateVar (Index1 GLfloat)

-- | Controls the value <i>s</i> used by <a>clear</a> to clear the stencil
--   buffer. <i>s</i> is masked with 2^<i>m</i>-1, where <i>m</i> is the
--   number of bits in the stencil buffer. Initially, the value is 0.
clearStencil :: StateVar GLint

-- | Controls the depth value used by <a>clear</a> to clear the depth
--   buffer. Values written into <a>clearDepth</a> are clamped to the range
--   [0, 1]. The initial value is 1.
clearDepth :: StateVar GLclampd

-- | Controls the red, green, blue, and alpha values used by <a>clear</a>
--   to clear the accumulation buffer. Values written into
--   <a>clearAccum</a> are clamped to the range [-1, 1]. The initial values
--   are all 0.
clearAccum :: StateVar (Color4 GLfloat)

-- | An operation on the accumulation buffer.
data AccumOp

-- | Obtains <i>R</i>, <i>G</i>, <i>B</i>, and <i>A</i> values from the
--   buffer currently selected for reading (see <a>readBuffer</a>). Each
--   component value is divided by 2^<i>n</i>-1, where <i>n</i> is the
--   number of bits allocated to each color component in the currently
--   selected buffer. The result is a floating-point value in the range [0,
--   1], which is multiplied by the value given to <a>accum</a> and added
--   to the corresponding pixel component in the accumulation buffer,
--   thereby updating the accumulation buffer.
Accum :: AccumOp

-- | Similar to <a>Accum</a>, except that the current value in the
--   accumulation buffer is not used in the calculation of the new value.
--   That is, the <i>R</i>, <i>G</i>, <i>B</i>, and <i>A</i> values from
--   the currently selected buffer are divided by 2^<i>n</i>-1, multiplied
--   by the value given to <a>accum</a>, and then stored in the
--   corresponding accumulation buffer cell, overwriting the current value.
Load :: AccumOp

-- | Transfers accumulation buffer values to the color buffer or buffers
--   currently selected for writing. Each <i>R</i>, <i>G</i>, <i>B</i>, and
--   <i>A</i> component is multiplied by the value given to <a>accum</a>,
--   then multiplied by 2^<i>n</i>-1, clamped to the range [0,
--   2^<i>n</i>-1], and stored in the corresponding display buffer cell.
--   The only fragment operations that are applied to this transfer are
--   pixel ownership, scissor, dithering, and color writemasks.
Return :: AccumOp

-- | Multiplies each <i>R</i>, <i>G</i>, <i>B</i>, and <i>A</i> in the
--   accumulation buffer by the value given to <a>accum</a> and returns the
--   scaled component to its corresponding accumulation buffer location.
Mult :: AccumOp

-- | Adds the value given to <a>accum</a> to each <i>R</i>, <i>G</i>,
--   <i>B</i>, and <i>A</i> in the accumulation buffer.
Add :: AccumOp

-- | The accumulation buffer is an extended-range color buffer. Images are
--   not rendered into it. Rather, images rendered into one of the color
--   buffers are added to the contents of the accumulation buffer after
--   rendering. Effects such as antialiasing (of points, lines, and
--   polygons), motion blur, and depth of field can be created by
--   accumulating images generated with different transformation matrices.
--   
--   Each pixel in the accumulation buffer consists of red, green, blue,
--   and alpha values. The number of bits per component in the accumulation
--   buffer depends on the implementation (see <a>accumBits</a>).
--   Regardless of the number of bits per component, the range of values
--   stored by each component is [-1, 1]. The accumulation buffer pixels
--   are mapped one-to-one with frame buffer pixels.
--   
--   <a>accum</a> operates on the accumulation buffer. The first argument
--   selects an accumulation buffer operation. The second argument, is a
--   floating-point value to be used in that operation, see <a>AccumOp</a>.
--   
--   All accumulation buffer operations are limited to the area of the
--   current scissor box and applied identically to the red, green, blue,
--   and alpha components of each pixel. If an <a>accum</a> operation
--   results in a value outside the range [-1, 1], the contents of an
--   accumulation buffer pixel component are undefined.
--   
--   To clear the accumulation buffer, use <a>clearAccum</a> to specify the
--   clear value, then call <a>clear</a> with the accumulation buffer
--   enabled.
accum :: AccumOp -> GLfloat -> IO ()
instance Eq ClearBuffer
instance Ord ClearBuffer
instance Show ClearBuffer
instance Eq AccumOp
instance Ord AccumOp
instance Show AccumOp


-- | This module corresponds to section 2.13 (Current Raster Position) of
--   the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.RasterPos
currentRasterPosition :: StateVar (Vertex4 GLfloat)
class RasterPosComponent a
class RasterPos a
rasterPos :: RasterPos a => a -> IO ()
rasterPosv :: RasterPos a => Ptr a -> IO ()
class WindowPosComponent a
class WindowPos a
windowPos :: WindowPos a => a -> IO ()
windowPosv :: WindowPos a => Ptr a -> IO ()
currentRasterDistance :: GettableStateVar GLfloat
currentRasterColor :: GettableStateVar (Color4 GLfloat)
currentRasterSecondaryColor :: GettableStateVar (Color4 GLfloat)
currentRasterIndex :: GettableStateVar (Index1 GLint)
currentRasterTexCoords :: GettableStateVar (TexCoord4 GLfloat)
currentRasterPositionValid :: GettableStateVar Bool
rasterPositionUnclipped :: StateVar Capability
instance WindowPosComponent a => WindowPos (Vertex3 a)
instance WindowPosComponent a => WindowPos (Vertex2 a)
instance WindowPosComponent Double
instance WindowPosComponent Float
instance WindowPosComponent Int32
instance WindowPosComponent Int16
instance RasterPosComponent a => RasterPos (Vertex4 a)
instance RasterPosComponent a => RasterPos (Vertex3 a)
instance RasterPosComponent a => RasterPos (Vertex2 a)
instance RasterPosComponent Double
instance RasterPosComponent Float
instance RasterPosComponent Int32
instance RasterPosComponent Int16


-- | This module corresponds to section 3.3 (Points) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Points

-- | <a>pointSize</a> contains the rasterized diameter of both aliased and
--   antialiased points. The initial value is 1. Using a point size other
--   than 1 has different effects, depending on whether point antialiasing
--   is enabled (see <a>pointSmooth</a>) or point sprites are enabled (see
--   <a>pointSprite</a>). Both are initially disabled.
--   
--   The specified point size is multiplied with a distance attenuation
--   factor and clamped to the specified <a>pointSizeRange</a>, and further
--   clamped to the implementation-dependent point size range to produce
--   the derived point size using
--   
--   <pre>
--   <i>derivedSize</i> = <i>clamp</i> (<i>size</i> * <i>sqrt</i> (1 / (<i>a</i> + <i>b</i> * <i>d</i> + <i>c</i> * <i>d</i>^2)))
--   </pre>
--   
--   where <i>d</i> is the eye-coordinate distance from the eye to the
--   vertex, and <i>a</i>, <i>b</i>, and <i>c</i> are the distance
--   attenuation coefficients (see <a>pointDistanceAttenuation</a>).
--   
--   If multisampling is disabled, the computed point size is used as the
--   point's width.
--   
--   If multisampling is enabled, the point may be faded by modifying the
--   point alpha value (see <a>sampleCoverage</a>) instead of allowing the
--   point width to go below a given <a>pointFadeThresholdSize</a>. In this
--   case, the width is further modified in the following manner:
--   
--   <pre>
--   <i>width</i> = if <i>derivedSize</i> &gt;= <i>threshold</i> then <i>derivedSize</i> else <i>threshold</i>
--   </pre>
--   
--   The point alpha value is modified by computing:
--   
--   <pre>
--   <i>alpha</i> = if <i>derivedSize</i> &gt;= <i>threshold</i> then 1 else (<i>derivedSize</i> / <i>threshold</i>)^2
--   </pre>
--   
--   If point antialiasing is disabled, the actual size is determined by
--   rounding the supplied size to the nearest integer. (If the rounding
--   results in the value 0, it is as if the point size were 1.) If the
--   rounded size is odd, then the center point (<i>x</i>, <i>y</i>) of the
--   pixel fragment that represents the point is computed as
--   
--   <pre>
--   (<i>x</i>, <i>y</i>) = (<i>floor</i> <i>xw</i> + 0.5, <i>floor</i> <i>yw</i> + 0.5)
--   </pre>
--   
--   where <i>xw</i> and <i>yw</i> indicate window coordinates. All pixels
--   that lie within the square grid of the rounded size centered at
--   (<i>x</i>, <i>y</i>) make up the fragment. If the size is even, the
--   center point is
--   
--   <pre>
--   (<i>x</i>, <i>y</i>) = (<i>floor</i> (<i>xw</i> + 0.5), <i>floor</i> (<i>yw</i> + 0.5))
--   </pre>
--   
--   and the rasterized fragment's centers are the half-integer window
--   coordinates within the square of the rounded size centered at
--   (<i>x</i>, <i>y</i>). All pixel fragments produced in rasterizing a
--   nonantialiased point are assigned the same associated data, that of
--   the vertex corresponding to the point.
--   
--   If antialiasing is enabled, then point rasterization produces a
--   fragment for each pixel square that intersects the region lying within
--   the circle having diameter equal to the current point size and
--   centered at the point's (<i>xw</i>, <i>yw</i>). The coverage value for
--   each fragment is the window coordinate area of the intersection of the
--   circular region with the corresponding pixel square. This value is
--   saved and used in the final rasterization step. The data associated
--   with each fragment is the data associated with the point being
--   rasterized.
--   
--   Not all sizes are supported when point antialiasing is enabled. If an
--   unsupported size is requested, the nearest supported size is used.
--   Only size 1 is guaranteed to be supported; others depend on the
--   implementation. To query the range of supported sizes for antialiased
--   points and the size difference between supported sizes within the
--   range, query <a>smoothPointSizeRange</a> and
--   <a>smoothPointSizeGranularity</a>, respectively. For aliased points,
--   query the supported range with <a>aliasedPointSizeRange</a>.
--   
--   The point size specified when <a>pointSize</a> is set is always
--   returned when it is queried. Clamping and rounding for aliased and
--   antialiased points have no effect on the specified value.
--   
--   A non-antialiased point size may be clamped to an
--   implementation-dependent maximum. Although this maximum cannot be
--   queried, it must be no less than the maximum value for antialiased
--   points, rounded to the nearest integer value.
--   
--   An <a>InvalidValue</a> is generated if <a>pointSize</a> is set to a
--   value less than or equal to zero.
--   
--   An <a>InvalidOperation</a> is generated if <a>pointSize</a> is set
--   during <a>renderPrimitive</a>.
pointSize :: StateVar GLfloat
vertexProgramPointSize :: StateVar Capability

-- | The range to which the derived point size is clamped, see
--   <a>pointSize</a>. Note that the size is further clamped to the
--   implementation-dependent limits, see <a>aliasedPointSizeRange</a> and
--   <a>smoothPointSizeRange</a>. The initial range is (0, 1).
--   
--   An <a>InvalidValue</a> is generated if the lower or upper bound of the
--   range is set to a value less than zero. If the lower bound is greater
--   than the upper bound, the point size after clamping is undefined, but
--   no error is generated.
pointSizeRange :: StateVar (GLfloat, GLfloat)

-- | The constant, linear, and quadratic distance attenuation coefficients,
--   see <a>pointSize</a>. The initial coefficients are (1, 0, 0).
pointDistanceAttenuation :: StateVar (GLfloat, GLfloat, GLfloat)

-- | The threshold for alpha attenuation of points when multisampling is
--   used, see <a>pointSize</a>. The initial threshold is 1.
--   
--   An <a>InvalidValue</a> is generated if the threshold is set to a value
--   less than zero.
pointFadeThresholdSize :: StateVar GLfloat

-- | Controls whether point antialiasing is enabled. The initial state is
--   <a>Disabled</a>.
pointSmooth :: StateVar Capability

-- | Controls whether point sprites are enabled. The initial state is
--   <a>Disabled</a>. When point sprites are enabled, the state of point
--   antialiasing (i.e. <a>pointSmooth</a>) is ignored.
pointSprite :: StateVar Capability

-- | The smallest and largest supported size of aliased points.
aliasedPointSizeRange :: GettableStateVar (GLfloat, GLfloat)

-- | The smallest and largest supported size of antialiased points.
smoothPointSizeRange :: GettableStateVar (GLfloat, GLfloat)

-- | The antialiased point size granularity, i.e. the size difference
--   between supported sizes.
smoothPointSizeGranularity :: GettableStateVar GLfloat


-- | This module corresponds to section 3.4 (Line Segments) of the OpenGL
--   2.1 specs.
module Graphics.Rendering.OpenGL.GL.LineSegments

-- | <a>lineWidth</a> contains the rasterized width of both aliased and
--   antialiased lines. The initial value is 1. Using a line width other
--   than 1 has different effects, depending on whether line antialiasing
--   is enabled (see <a>lineSmooth</a>). Line antialiasing is initially
--   disabled.
--   
--   If line antialiasing is disabled, the actual width is determined by
--   rounding the supplied width to the nearest integer. (If the rounding
--   results in the value 0, it is as if the line width were 1.) If
--   <i>delta x</i> &gt;= <i>delta y</i>, <i>i</i> pixels are filled in
--   each column that is rasterized, where <i>i</i> is the rounded value of
--   <a>lineWidth</a>. Otherwise, <i>i</i> pixels are filled in each row
--   that is rasterized.
--   
--   If antialiasing is enabled, line rasterization produces a fragment for
--   each pixel square that intersects the region lying within the
--   rectangle having width equal to the current line width, length equal
--   to the actual length of the line, and centered on the mathematical
--   line segment. The coverage value for each fragment is the window
--   coordinate area of the intersection of the rectangular region with the
--   corresponding pixel square. This value is saved and used in the final
--   rasterization step.
--   
--   Not all widths can be supported when line antialiasing is enabled. If
--   an unsupported width is requested, the nearest supported width is
--   used. Only width 1 is guaranteed to be supported; others depend on the
--   implementation. Likewise, there is a range for aliased line widths as
--   well. To query the range of supported widths of antialiased lines and
--   the size difference between supported widths within the range, query
--   <a>smoothLineWidthRange</a> and <a>smoothLineWidthGranularity</a>,
--   respectively. For aliased lines, query the supported range with
--   <a>aliasedLineWidthRange</a>.
--   
--   The line width specified when <a>lineWidth</a> is set is always
--   returned when it is queried. Clamping and rounding for aliased and
--   antialiased lines have no effect on the specified value.
--   
--   A non-antialiased line width may be clamped to an
--   implementation-dependent maximum. Query <a>aliasedLineWidthRange</a>
--   to determine the maximum width.
--   
--   An <a>InvalidValue</a> is generated if <a>lineWidth</a> is set to a
--   value less than or equal to zero.
--   
--   An <a>InvalidOperation</a> is generated if <a>lineWidth</a> is set
--   during <a>renderPrimitive</a>.
lineWidth :: StateVar GLfloat

-- | Line stippling masks out certain fragments produced by rasterization;
--   those fragments will not be drawn. The masking is achieved by using
--   three parameters: the repeat count (1st element of the
--   <a>lineStipple</a> pair, clamped to the range [ 1 .. 256 ]), the
--   16-bit line stipple pattern (2nd element), and an integer stipple
--   counter <i>s</i>.
--   
--   The counter <i>s</i> is reset to 0 at before the first action during
--   <a>renderPrimitive</a> is called and before each line segment during
--   <a>renderPrimitive</a> is generated. It is incremented after each
--   fragment of a unit width aliased line segment is generated or after
--   each <i>i</i> fragments of an <i>i</i> width line segment are
--   generated. The <i>i</i> fragments associated with count <i>s</i> are
--   masked out if <tt><a>testBit</a> <i>pattern</i> (( <i>s</i> /
--   <i>factor</i> ) <i>mod</i> 16)</tt> is <a>False</a>, otherwise these
--   fragments are sent to the frame buffer. Bit zero of the pattern is the
--   least significant bit, i.e. it is used first.
--   
--   Antialiased lines are treated as a sequence of rectangles of height 1
--   for purposes of stippling. Whether rectangle <i>s</i> is rasterized or
--   not depends on the fragment rule described for aliased lines, counting
--   rectangles rather than groups of fragments.
--   
--   The initial value of <a>lineStipple</a> is <a>Nothing</a>, i.e. line
--   stippling is disabled.
--   
--   An <a>InvalidOperation</a> is generated if <a>lineStipple</a> is set
--   during <a>renderPrimitive</a>.
lineStipple :: StateVar (Maybe (GLint, GLushort))

-- | Controls whether line antialiasing is enabled. The initial state is
--   <a>Disabled</a>.
lineSmooth :: StateVar Capability

-- | The smallest and largest supported width of aliased lines.
aliasedLineWidthRange :: GettableStateVar (GLfloat, GLfloat)

-- | The smallest and largest supported width of antialiased lines.
smoothLineWidthRange :: GettableStateVar (GLfloat, GLfloat)

-- | The antialiased line width granularity, i.e. the size difference
--   between supported widths.
smoothLineWidthGranularity :: GettableStateVar GLfloat


-- | This module corresponds to section 4.1 (Per-Fragment Operations) of
--   the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PerFragment
scissor :: StateVar (Maybe (Position, Size))
sampleAlphaToCoverage :: StateVar Capability
sampleAlphaToOne :: StateVar Capability
sampleCoverage :: StateVar (Maybe (GLclampf, Bool))
depthBounds :: StateVar (Maybe (GLclampd, GLclampd))
data ComparisonFunction
Never :: ComparisonFunction
Less :: ComparisonFunction
Equal :: ComparisonFunction
Lequal :: ComparisonFunction
Greater :: ComparisonFunction
Notequal :: ComparisonFunction
Gequal :: ComparisonFunction
Always :: ComparisonFunction
alphaFunc :: StateVar (Maybe (ComparisonFunction, GLclampf))
stencilTest :: StateVar Capability
stencilFunc :: StateVar (ComparisonFunction, GLint, GLuint)
stencilFuncSeparate :: Face -> SettableStateVar (ComparisonFunction, GLint, GLuint)
data StencilOp
OpZero :: StencilOp
OpKeep :: StencilOp
OpReplace :: StencilOp
OpIncr :: StencilOp
OpIncrWrap :: StencilOp
OpDecr :: StencilOp
OpDecrWrap :: StencilOp
OpInvert :: StencilOp
stencilOp :: StateVar (StencilOp, StencilOp, StencilOp)
stencilOpSeparate :: Face -> SettableStateVar (StencilOp, StencilOp, StencilOp)
activeStencilFace :: StateVar (Maybe Face)
depthFunc :: StateVar (Maybe ComparisonFunction)
newtype QueryObject
QueryObject :: GLuint -> QueryObject
data QueryTarget
SamplesPassed :: QueryTarget

-- | Convenience function for an exception-safe combination of
--   <a>beginQuery</a> and <a>endQuery</a>.
withQuery :: QueryTarget -> QueryObject -> IO a -> IO a
beginQuery :: QueryTarget -> QueryObject -> IO ()
endQuery :: QueryTarget -> IO ()
queryCounterBits :: QueryTarget -> GettableStateVar GLsizei
currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)
queryResult :: QueryObject -> GettableStateVar GLuint
queryResultAvailable :: QueryObject -> GettableStateVar Bool
blend :: StateVar Capability
data BlendEquation
FuncAdd :: BlendEquation
FuncSubtract :: BlendEquation
FuncReverseSubtract :: BlendEquation
Min :: BlendEquation
Max :: BlendEquation
LogicOp :: BlendEquation
blendEquation :: StateVar BlendEquation
blendEquationSeparate :: StateVar (BlendEquation, BlendEquation)
data BlendingFactor
Zero :: BlendingFactor
One :: BlendingFactor
SrcColor :: BlendingFactor
OneMinusSrcColor :: BlendingFactor
DstColor :: BlendingFactor
OneMinusDstColor :: BlendingFactor
SrcAlpha :: BlendingFactor
OneMinusSrcAlpha :: BlendingFactor
DstAlpha :: BlendingFactor
OneMinusDstAlpha :: BlendingFactor
ConstantColor :: BlendingFactor
OneMinusConstantColor :: BlendingFactor
ConstantAlpha :: BlendingFactor
OneMinusConstantAlpha :: BlendingFactor
SrcAlphaSaturate :: BlendingFactor
blendFuncSeparate :: StateVar ((BlendingFactor, BlendingFactor), (BlendingFactor, BlendingFactor))
blendFunc :: StateVar (BlendingFactor, BlendingFactor)
blendColor :: StateVar (Color4 GLclampf)
dither :: StateVar Capability
data LogicOp
Clear :: LogicOp
And :: LogicOp
AndReverse :: LogicOp
Copy :: LogicOp
AndInverted :: LogicOp
Noop :: LogicOp
Xor :: LogicOp
Or :: LogicOp
Nor :: LogicOp
Equiv :: LogicOp
Invert :: LogicOp
OrReverse :: LogicOp
CopyInverted :: LogicOp
OrInverted :: LogicOp
Nand :: LogicOp
Set :: LogicOp
logicOp :: StateVar (Maybe LogicOp)
instance Eq StencilOp
instance Ord StencilOp
instance Show StencilOp
instance Eq QueryObject
instance Ord QueryObject
instance Show QueryObject
instance Eq QueryTarget
instance Ord QueryTarget
instance Show QueryTarget
instance Eq BlendEquation
instance Ord BlendEquation
instance Show BlendEquation
instance Eq LogicOp
instance Ord LogicOp
instance Show LogicOp
instance ObjectName QueryObject


-- | This module corresponds to a part of section 3.6.1 (Pixel Storage
--   Modes) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.ColorTable
data ColorTableStage
ColorTableStage :: ColorTableStage
PostConvolutionColorTableStage :: ColorTableStage
PostColorMatrixColorTableStage :: ColorTableStage
TextureColorTableStage :: ColorTableStage
colorTableStage :: ColorTableStage -> StateVar Capability
data Proxy
NoProxy :: Proxy
Proxy :: Proxy
data ColorTable
ColorTable :: ColorTable
PostConvolutionColorTable :: ColorTable
PostColorMatrixColorTable :: ColorTable
Texture1DColorTable :: ColorTable
Texture2DColorTable :: ColorTable
Texture3DColorTable :: ColorTable
TextureCubeMapColorTable :: ColorTable
TextureColorTable :: ColorTable
SharedTexturePalette :: ColorTable
data PixelInternalFormat
Alpha' :: PixelInternalFormat
DepthComponent' :: PixelInternalFormat
Luminance' :: PixelInternalFormat
LuminanceAlpha' :: PixelInternalFormat
Intensity :: PixelInternalFormat
RGB' :: PixelInternalFormat
RGBA' :: PixelInternalFormat
SRGB :: PixelInternalFormat
SRGBAlpha :: PixelInternalFormat
SLuminance :: PixelInternalFormat
SLuminanceAlpha :: PixelInternalFormat
Alpha4 :: PixelInternalFormat
Alpha8 :: PixelInternalFormat
Alpha12 :: PixelInternalFormat
Alpha16 :: PixelInternalFormat
DepthComponent16 :: PixelInternalFormat
DepthComponent24 :: PixelInternalFormat
DepthComponent32 :: PixelInternalFormat
Luminance4 :: PixelInternalFormat
Luminance8 :: PixelInternalFormat
Luminance12 :: PixelInternalFormat
Luminance16 :: PixelInternalFormat
Luminance4Alpha4 :: PixelInternalFormat
Luminance6Alpha2 :: PixelInternalFormat
Luminance8Alpha8 :: PixelInternalFormat
Luminance12Alpha4 :: PixelInternalFormat
Luminance12Alpha12 :: PixelInternalFormat
Luminance16Alpha16 :: PixelInternalFormat
Intensity4 :: PixelInternalFormat
Intensity8 :: PixelInternalFormat
Intensity12 :: PixelInternalFormat
Intensity16 :: PixelInternalFormat
R3G3B2 :: PixelInternalFormat
RGB4 :: PixelInternalFormat
RGB5 :: PixelInternalFormat
RGB8 :: PixelInternalFormat
RGB10 :: PixelInternalFormat
RGB12 :: PixelInternalFormat
RGB16 :: PixelInternalFormat
RGBA2 :: PixelInternalFormat
RGBA4 :: PixelInternalFormat
RGB5A1 :: PixelInternalFormat
RGBA8 :: PixelInternalFormat
RGB10A2 :: PixelInternalFormat
RGBA12 :: PixelInternalFormat
RGBA16 :: PixelInternalFormat
SRGB8 :: PixelInternalFormat
SRGB8Alpha8 :: PixelInternalFormat
SLuminance8 :: PixelInternalFormat
SLuminance8Alpha8 :: PixelInternalFormat
CompressedAlpha :: PixelInternalFormat
CompressedLuminance :: PixelInternalFormat
CompressedLuminanceAlpha :: PixelInternalFormat
CompressedIntensity :: PixelInternalFormat
CompressedRGB :: PixelInternalFormat
CompressedRGBA :: PixelInternalFormat
CompressedSRGB :: PixelInternalFormat
CompressedSRGBAlpha :: PixelInternalFormat
CompressedSLuminance :: PixelInternalFormat
CompressedSLuminanceAlpha :: PixelInternalFormat
DepthComponent32f :: PixelInternalFormat
Depth32fStencil8 :: PixelInternalFormat
RGB9E5 :: PixelInternalFormat
R11fG11fB10f :: PixelInternalFormat
colorTable :: Proxy -> ColorTable -> PixelInternalFormat -> GLsizei -> PixelData a -> IO ()
getColorTable :: ColorTable -> PixelData a -> IO ()
copyColorTable :: ColorTable -> PixelInternalFormat -> Position -> GLsizei -> IO ()
colorSubTable :: ColorTable -> GLsizei -> GLsizei -> PixelData a -> IO ()
copyColorSubTable :: ColorTable -> GLsizei -> Position -> GLsizei -> IO ()
colorTableScale :: ColorTableStage -> StateVar (Color4 GLfloat)
colorTableBias :: ColorTableStage -> StateVar (Color4 GLfloat)
colorTableFormat :: ColorTable -> GettableStateVar PixelInternalFormat
colorTableWidth :: ColorTable -> GettableStateVar GLsizei
colorTableRGBASizes :: ColorTable -> GettableStateVar (Color4 GLsizei)
colorTableLuminanceSize :: ColorTable -> GettableStateVar GLsizei
colorTableIntesitySize :: ColorTable -> GettableStateVar GLsizei
instance Eq ColorTableStage
instance Ord ColorTableStage
instance Show ColorTableStage
instance Eq ColorTable
instance Ord ColorTable
instance Show ColorTable
instance Eq Proxy
instance Ord Proxy
instance Show Proxy


-- | This module corresponds to a part of section 3.6.1 (Pixel Storage
--   Modes) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Convolution
data ConvolutionTarget
Convolution1D :: ConvolutionTarget
Convolution2D :: ConvolutionTarget
Separable2D :: ConvolutionTarget
convolution :: ConvolutionTarget -> StateVar Capability
convolutionFilter1D :: PixelInternalFormat -> GLsizei -> PixelData a -> IO ()
getConvolutionFilter1D :: PixelData a -> IO ()
convolutionFilter2D :: PixelInternalFormat -> Size -> PixelData a -> IO ()
getConvolutionFilter2D :: PixelData a -> IO ()
separableFilter2D :: PixelInternalFormat -> Size -> PixelData a -> PixelData a -> IO ()
getSeparableFilter2D :: PixelData a -> PixelData a -> IO ()
copyConvolutionFilter1D :: PixelInternalFormat -> Position -> GLsizei -> IO ()
copyConvolutionFilter2D :: PixelInternalFormat -> Position -> Size -> IO ()
convolutionWidth :: ConvolutionTarget -> GettableStateVar GLsizei
convolutionHeight :: ConvolutionTarget -> GettableStateVar GLsizei
maxConvolutionWidth :: ConvolutionTarget -> GettableStateVar GLsizei
maxConvolutionHeight :: ConvolutionTarget -> GettableStateVar GLsizei
data ConvolutionBorderMode
Reduce :: ConvolutionBorderMode
ConstantBorder :: (Color4 GLfloat) -> ConvolutionBorderMode
ReplicateBorder :: ConvolutionBorderMode
convolutionBorderMode :: ConvolutionTarget -> StateVar ConvolutionBorderMode
convolutionFilterScale :: ConvolutionTarget -> StateVar (Color4 GLfloat)
convolutionFilterBias :: ConvolutionTarget -> StateVar (Color4 GLfloat)
instance Eq ConvolutionTarget
instance Ord ConvolutionTarget
instance Show ConvolutionTarget
instance Eq ConvolutionParameter
instance Ord ConvolutionParameter
instance Show ConvolutionParameter
instance Eq ConvolutionBorderMode
instance Ord ConvolutionBorderMode
instance Show ConvolutionBorderMode


-- | This module corresponds to a part of section 3.6.1 (Pixel Storage
--   Modes) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Histogram
data Sink
PassThrough :: Sink
Sink :: Sink
histogram :: Proxy -> StateVar (Maybe (GLsizei, PixelInternalFormat, Sink))
data Reset
NoReset :: Reset
Reset :: Reset
getHistogram :: Reset -> PixelData a -> IO ()
resetHistogram :: IO ()
histogramRGBASizes :: Proxy -> GettableStateVar (Color4 GLsizei)
histogramLuminanceSize :: Proxy -> GettableStateVar GLsizei


-- | This module corresponds to a part of section 3.6.1 (Pixel Storage
--   Modes) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelTransfer
data PixelTransferStage
PreConvolution :: PixelTransferStage
PostConvolution :: PixelTransferStage
PostColorMatrix :: PixelTransferStage
mapColor :: StateVar Capability
mapStencil :: StateVar Capability
indexShift :: StateVar GLint
indexOffset :: StateVar GLint
depthScale :: StateVar GLfloat
depthBias :: StateVar GLfloat
rgbaScale :: PixelTransferStage -> StateVar (Color4 GLfloat)
rgbaBias :: PixelTransferStage -> StateVar (Color4 GLfloat)
instance Eq PixelTransferStage
instance Ord PixelTransferStage
instance Show PixelTransferStage


-- | This module corresponds to a part of section 3.6.1 (Pixel Storage
--   Modes) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Minmax
minmax :: StateVar (Maybe (PixelInternalFormat, Sink))
getMinmax :: Reset -> PixelData a -> IO ()
resetMinmax :: IO ()


-- | This module corresponds to section 3.6 (Pixel Rectangles) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.PixelRectangles


-- | This module corresponds to section 3.5 (Polygons) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Polygons
polygonSmooth :: StateVar Capability
cullFace :: StateVar (Maybe Face)
class PolygonStipple s where withNewPolygonStipple act = allocaArray numPolygonStippleBytes $ \ p -> do { act p; components <- peekArray numPolygonStippleBytes p; newPolygonStipple components } withPolygonStipple s act = do { components <- getPolygonStippleComponents s; withArray components act } newPolygonStipple components = withNewPolygonStipple $ flip pokeArray (take numPolygonStippleBytes components) getPolygonStippleComponents s = withPolygonStipple s $ peekArray numPolygonStippleBytes
withNewPolygonStipple :: PolygonStipple s => (Ptr GLubyte -> IO ()) -> IO s
withPolygonStipple :: PolygonStipple s => s -> (Ptr GLubyte -> IO a) -> IO a
newPolygonStipple :: PolygonStipple s => [GLubyte] -> IO s
getPolygonStippleComponents :: PolygonStipple s => s -> IO [GLubyte]
data GLpolygonstipple
polygonStipple :: PolygonStipple s => StateVar (Maybe s)
data PolygonMode
Point :: PolygonMode
Line :: PolygonMode
Fill :: PolygonMode
polygonMode :: StateVar (PolygonMode, PolygonMode)
polygonOffset :: StateVar (GLfloat, GLfloat)
polygonOffsetPoint :: StateVar Capability
polygonOffsetLine :: StateVar Capability
polygonOffsetFill :: StateVar Capability
instance Eq GLpolygonstipple
instance Ord GLpolygonstipple
instance Show GLpolygonstipple
instance PolygonStipple GLpolygonstipple


-- | This module corresponds to section 5.1 (Evaluators) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Evaluators
type Order = GLint
maxOrder :: GettableStateVar Order
class Storable d => Domain d
evalCoord1 :: Domain d => d -> IO ()
evalCoord1v :: Domain d => Ptr d -> IO ()
evalCoord2 :: Domain d => (d, d) -> IO ()
evalCoord2v :: Domain d => Ptr d -> IO ()
data Domain d => MapDescriptor d
MapDescriptor :: (d, d) -> Stride -> Order -> NumComponents -> MapDescriptor d
class ControlPoint c
class Map1 m where withNewMap1 descriptor@(MapDescriptor domain _ _ _) act = do { allocaArray (totalComponents1 descriptor) $ \ ptr -> do { act ptr; controlPoints <- peekControlPoints1 descriptor ptr; newMap1 domain controlPoints } } withMap1 m act = do { (domain, controlPoints) <- getMap1Components m; let stride = numComponents (head controlPoints) order = genericLength controlPoints descriptor = MapDescriptor domain stride order (fromIntegral stride); allocaArray (totalComponents1 descriptor) $ \ ptr -> do { pokeControlPoints1 descriptor ptr controlPoints; act descriptor ptr } } newMap1 domain controlPoints = do { let stride = numComponents (head controlPoints) order = genericLength controlPoints descriptor = MapDescriptor domain stride order (fromIntegral stride); withNewMap1 descriptor $ \ ptr -> pokeControlPoints1 descriptor ptr controlPoints } getMap1Components m = withMap1 m $ \ descriptor@(MapDescriptor domain _ _ _) ptr -> do { controlPoints <- peekControlPoints1 descriptor ptr; return (domain, controlPoints) }
withNewMap1 :: (Map1 m, ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d)
withMap1 :: (Map1 m, ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> Ptr d -> IO a) -> IO a
newMap1 :: (Map1 m, ControlPoint c, Domain d) => (d, d) -> [c d] -> IO (m c d)
getMap1Components :: (Map1 m, 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 uDescriptor@(MapDescriptor uDomain _ _ _) vDescriptor@(MapDescriptor vDomain _ _ _) act = allocaArray (totalComponents2 uDescriptor vDescriptor) $ \ ptr -> do { act ptr; controlPoints <- peekControlPoints2 uDescriptor vDescriptor ptr; newMap2 uDomain vDomain controlPoints } withMap2 m act = do { (uDomain, vDomain, controlPoints) <- getMap2Components m; let vStride = numComponents (head (head controlPoints)) vOrder = genericLength (head controlPoints) uStride = vStride * fromIntegral vOrder uOrder = genericLength controlPoints numComp = fromIntegral vStride uDescriptor = MapDescriptor uDomain uStride uOrder numComp vDescriptor = MapDescriptor vDomain vStride vOrder numComp; allocaArray (totalComponents2 uDescriptor vDescriptor) $ \ ptr -> do { pokeControlPoints2 uDescriptor vDescriptor ptr controlPoints; act uDescriptor vDescriptor ptr } } newMap2 uDomain vDomain controlPoints = do { let vStride = numComponents (head (head controlPoints)) vOrder = genericLength (head controlPoints) uStride = vStride * fromIntegral vOrder uOrder = genericLength controlPoints numComp = fromIntegral vStride uDescriptor = MapDescriptor uDomain uStride uOrder numComp vDescriptor = MapDescriptor vDomain vStride vOrder numComp; withNewMap2 uDescriptor vDescriptor $ \ ptr -> pokeControlPoints2 uDescriptor vDescriptor ptr controlPoints } getMap2Components m = withMap2 m $ \ uDescriptor@(MapDescriptor uDomain _ _ _) vDescriptor@(MapDescriptor vDomain _ _ _) ptr -> do { controlPoints <- peekControlPoints2 uDescriptor vDescriptor ptr; return (uDomain, vDomain, controlPoints) }
withNewMap2 :: (Map2 m, ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> IO ()) -> IO (m c d)
withMap2 :: (Map2 m, ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> IO a) -> IO a
newMap2 :: (Map2 m, ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> IO (m c d)
getMap2Components :: (Map2 m, 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
instance (Eq d, Domain d) => Eq (MapDescriptor d)
instance (Ord d, Domain d) => Ord (MapDescriptor d)
instance (Show d, Domain d) => Show (MapDescriptor d)
instance (Eq d, Domain d, ControlPoint c) => Eq (GLmap1 c d)
instance (Ord d, Domain d, ControlPoint c) => Ord (GLmap1 c d)
instance (Show d, Domain d, ControlPoint c) => Show (GLmap1 c d)
instance (Eq d, Domain d, ControlPoint c) => Eq (GLmap2 c d)
instance (Ord d, Domain d, ControlPoint c) => Ord (GLmap2 c d)
instance (Show d, Domain d, ControlPoint c) => Show (GLmap2 c d)
instance Map2 GLmap2
instance Map1 GLmap1


-- | This module corresponds to section 4.3 (Drawing, Reading, and Copying
--   Pixels) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.ReadCopyPixels
readPixels :: Position -> Size -> PixelData a -> IO ()
readBuffer :: StateVar BufferMode
data PixelCopyType
CopyColor :: PixelCopyType
CopyDepth :: PixelCopyType
CopyStencil :: PixelCopyType
copyPixels :: Position -> Size -> PixelCopyType -> IO ()
instance Eq PixelCopyType
instance Ord PixelCopyType
instance Show PixelCopyType


-- | This module corresponds to section 3.8.1 (Texture Image
--   Specification), section 3.8.2 (Alternate Texture Image Specification
--   Commands), and section 3.8.3 (Compressed Texture Images) of the OpenGL
--   2.1 specs.
module Graphics.Rendering.OpenGL.GL.Texturing.Specification
data TextureTarget
Texture1D :: TextureTarget
Texture2D :: TextureTarget
Texture3D :: TextureTarget
TextureCubeMap :: TextureTarget
TextureRectangle :: TextureTarget
data CubeMapTarget
TextureCubeMapPositiveX :: CubeMapTarget
TextureCubeMapNegativeX :: CubeMapTarget
TextureCubeMapPositiveY :: CubeMapTarget
TextureCubeMapNegativeY :: CubeMapTarget
TextureCubeMapPositiveZ :: CubeMapTarget
TextureCubeMapNegativeZ :: CubeMapTarget
type Level = GLint
type Border = GLint
newtype TexturePosition1D
TexturePosition1D :: GLint -> TexturePosition1D
data TexturePosition2D
TexturePosition2D :: !GLint -> !GLint -> TexturePosition2D
data TexturePosition3D
TexturePosition3D :: !GLint -> !GLint -> !GLint -> TexturePosition3D
newtype TextureSize1D
TextureSize1D :: GLsizei -> TextureSize1D
data TextureSize2D
TextureSize2D :: !GLsizei -> !GLsizei -> TextureSize2D
data TextureSize3D
TextureSize3D :: !GLsizei -> !GLsizei -> !GLsizei -> TextureSize3D
texImage1D :: Proxy -> Level -> PixelInternalFormat -> TextureSize1D -> Border -> PixelData a -> IO ()
texImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> IO ()
texImage3D :: Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> IO ()
copyTexImage1D :: Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> IO ()
copyTexImage2D :: Maybe CubeMapTarget -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> IO ()
texSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> IO ()
texSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> IO ()
texSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> IO ()
getTexImage :: Either TextureTarget CubeMapTarget -> Level -> PixelData a -> IO ()
copyTexSubImage1D :: Level -> TexturePosition1D -> Position -> TextureSize1D -> IO ()
copyTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> Position -> TextureSize2D -> IO ()
copyTexSubImage3D :: Level -> TexturePosition3D -> Position -> TextureSize2D -> IO ()
newtype CompressedTextureFormat
CompressedTextureFormat :: GLenum -> CompressedTextureFormat
compressedTextureFormats :: GettableStateVar [CompressedTextureFormat]
data CompressedPixelData a
CompressedPixelData :: !CompressedTextureFormat -> GLsizei -> (Ptr a) -> CompressedPixelData a
compressedTexImage1D :: Proxy -> Level -> TextureSize1D -> Border -> CompressedPixelData a -> IO ()
compressedTexImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> IO ()
compressedTexImage3D :: Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> IO ()
compressedTexSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> IO ()
compressedTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> IO ()
compressedTexSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> IO ()
getCompressedTexImage :: Either TextureTarget CubeMapTarget -> Level -> Ptr a -> IO ()
maxTextureSize :: TextureTarget -> GettableStateVar GLsizei
instance Eq TexturePosition1D
instance Ord TexturePosition1D
instance Show TexturePosition1D
instance Eq TexturePosition2D
instance Ord TexturePosition2D
instance Show TexturePosition2D
instance Eq TexturePosition3D
instance Ord TexturePosition3D
instance Show TexturePosition3D
instance Eq TextureSize1D
instance Ord TextureSize1D
instance Show TextureSize1D
instance Eq TextureSize2D
instance Ord TextureSize2D
instance Show TextureSize2D
instance Eq TextureSize3D
instance Ord TextureSize3D
instance Show TextureSize3D
instance Eq CompressedTextureFormat
instance Ord CompressedTextureFormat
instance Show CompressedTextureFormat
instance Eq (CompressedPixelData a)
instance Ord (CompressedPixelData a)
instance Show (CompressedPixelData a)


-- | This module offers various texture queries.
module Graphics.Rendering.OpenGL.GL.Texturing.Queries
type TextureQuery a = Either TextureTarget CubeMapTarget -> Level -> GettableStateVar a
textureInternalFormat :: TextureQuery PixelInternalFormat
textureSize1D :: TextureQuery TextureSize1D
textureSize2D :: TextureQuery TextureSize2D
textureSize3D :: TextureQuery TextureSize3D
textureBorder :: TextureQuery Border
textureRGBASizes :: TextureQuery (Color4 GLsizei)
textureSharedSize :: TextureQuery GLsizei
textureIntensitySize :: TextureQuery GLsizei
textureLuminanceSize :: TextureQuery GLsizei
textureIndexSize :: TextureQuery GLsizei
textureDepthBits :: TextureQuery GLsizei
textureCompressedImageSize :: TextureQuery (Maybe GLsizei)
textureProxyOK :: TextureQuery Bool


-- | This module corresponds to section 3.8.12 (Texture Objects) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Texturing.Objects
newtype TextureObject
TextureObject :: GLuint -> TextureObject
textureBinding :: TextureTarget -> StateVar (Maybe TextureObject)
textureResident :: TextureTarget -> GettableStateVar Bool
areTexturesResident :: [TextureObject] -> IO ([TextureObject], [TextureObject])
type TexturePriority = GLclampf
texturePriority :: TextureTarget -> StateVar TexturePriority
prioritizeTextures :: [(TextureObject, TexturePriority)] -> IO ()
instance Eq TextureObject
instance Ord TextureObject
instance Show TextureObject
instance ObjectName TextureObject


-- | This module corresponds to chapter 3 (Mipmapping) of the GLU specs.
module Graphics.Rendering.OpenGL.GLU.Mipmapping
scaleImage :: Size -> PixelData a -> Size -> PixelData b -> IO ()
build1DMipmaps :: TextureTarget -> PixelInternalFormat -> GLsizei -> PixelData a -> IO ()
build2DMipmaps :: TextureTarget -> PixelInternalFormat -> GLsizei -> GLsizei -> PixelData a -> IO ()


-- | This module corresponds to section 3.8.15 (Texture Application) of the
--   OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Texturing.Application
texture :: TextureTarget -> StateVar Capability


-- | This module corresponds to section 3.8.4 (Texture Parameters), section
--   3.8.7 (Texture Wrap Mode), section 3.8.8 (Texture Minification), and
--   section 3.8.9 (Texture Magnification) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Texturing.Parameters
data TextureFilter
Nearest :: TextureFilter
Linear' :: TextureFilter
type MinificationFilter = (TextureFilter, Maybe TextureFilter)
type MagnificationFilter = TextureFilter
textureFilter :: TextureTarget -> StateVar (MinificationFilter, MagnificationFilter)
data Repetition
Repeated :: Repetition
Mirrored :: Repetition
data Clamping
Clamp :: Clamping
Repeat :: Clamping
ClampToEdge :: Clamping
ClampToBorder :: Clamping
textureWrapMode :: TextureTarget -> TextureCoordName -> StateVar (Repetition, Clamping)
textureBorderColor :: TextureTarget -> StateVar (Color4 GLfloat)
type LOD = GLfloat
textureObjectLODBias :: TextureTarget -> StateVar LOD
maxTextureLODBias :: GettableStateVar LOD
textureLODRange :: TextureTarget -> StateVar (LOD, LOD)
textureMaxAnisotropy :: TextureTarget -> StateVar GLfloat
maxTextureMaxAnisotropy :: GettableStateVar GLfloat
textureLevelRange :: TextureTarget -> StateVar (Level, Level)
generateMipmap :: TextureTarget -> StateVar Capability
depthTextureMode :: TextureTarget -> StateVar PixelInternalFormat
textureCompareMode :: TextureTarget -> StateVar (Maybe ComparisonFunction)
textureCompareFailValue :: TextureTarget -> StateVar GLclampf
data TextureCompareOperator
LequalR :: TextureCompareOperator
GequalR :: TextureCompareOperator
textureCompareOperator :: TextureTarget -> StateVar (Maybe TextureCompareOperator)
instance Eq TextureFilter
instance Ord TextureFilter
instance Show TextureFilter
instance Eq Repetition
instance Ord Repetition
instance Show Repetition
instance Eq Clamping
instance Ord Clamping
instance Show Clamping
instance Eq TextureCompareOperator
instance Ord TextureCompareOperator
instance Show TextureCompareOperator


-- | This module corresponds to section 3.8.13 (Texture Environments and
--   Texture Functions) of the OpenGL 2.1 specs.
module Graphics.Rendering.OpenGL.GL.Texturing.Environments
data TextureFunction
Modulate :: TextureFunction
Decal :: TextureFunction
Blend :: TextureFunction
Replace :: TextureFunction
AddUnsigned :: TextureFunction
Combine :: TextureFunction
Combine4 :: TextureFunction
textureFunction :: StateVar TextureFunction
data TextureCombineFunction
Replace' :: TextureCombineFunction
Modulate' :: TextureCombineFunction
AddUnsigned' :: TextureCombineFunction
AddSigned :: TextureCombineFunction
Interpolate :: TextureCombineFunction
Subtract :: TextureCombineFunction
Dot3RGB :: TextureCombineFunction
Dot3RGBA :: TextureCombineFunction
combineRGB :: StateVar TextureCombineFunction
combineAlpha :: StateVar TextureCombineFunction
data ArgNum
Arg0 :: ArgNum
Arg1 :: ArgNum
Arg2 :: ArgNum
Arg3 :: ArgNum
data Arg
Arg :: BlendingFactor -> Src -> Arg
data Src
CurrentUnit :: Src
Previous :: Src
Crossbar :: TextureUnit -> Src
Constant :: Src
PrimaryColor :: Src
argRGB :: ArgNum -> StateVar Arg
argAlpha :: ArgNum -> StateVar Arg
rgbScale :: StateVar GLfloat
alphaScale :: StateVar GLfloat
constantColor :: StateVar (Color4 GLfloat)
textureUnitLODBias :: StateVar LOD
instance Eq TextureFunction
instance Ord TextureFunction
instance Show TextureFunction
instance Eq TextureCombineFunction
instance Ord TextureCombineFunction
instance Show TextureCombineFunction
instance Eq ArgNum
instance Ord ArgNum
instance Show ArgNum
instance Eq Src
instance Ord Src
instance Show Src
instance Eq Arg
instance Ord Arg
instance Show Arg


-- | This module corresponds to section 3.8 (Texturing) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Texturing


-- | This module corresponds to chapter 7 (NURBS) of the GLU specs.
module Graphics.Rendering.OpenGL.GLU.NURBS
data NURBSObj
withNURBSObj :: a -> (NURBSObj -> IO a) -> IO a
type NURBSBeginCallback = PrimitiveMode -> IO ()
withNURBSBeginCallback :: NURBSObj -> NURBSBeginCallback -> IO a -> IO a
type NURBSVertexCallback = Vertex3 GLfloat -> IO ()
withNURBSVertexCallback :: NURBSObj -> NURBSVertexCallback -> IO a -> IO a
type NURBSNormalCallback = Normal3 GLfloat -> IO ()
withNURBSNormalCallback :: NURBSObj -> NURBSNormalCallback -> IO a -> IO a
type NURBSColorCallback = Color4 GLfloat -> IO ()
withNURBSColorCallback :: NURBSObj -> NURBSColorCallback -> IO a -> IO a
type NURBSEndCallback = IO ()
withNURBSEndCallback :: NURBSObj -> NURBSEndCallback -> IO a -> IO a
checkForNURBSError :: NURBSObj -> IO a -> IO a
nurbsBeginEndCurve :: NURBSObj -> IO a -> IO a
nurbsCurve :: ControlPoint c => NURBSObj -> GLint -> Ptr GLfloat -> GLint -> Ptr (c GLfloat) -> GLint -> IO ()
nurbsBeginEndSurface :: NURBSObj -> IO a -> IO a
nurbsSurface :: ControlPoint c => NURBSObj -> GLint -> Ptr GLfloat -> GLint -> Ptr GLfloat -> GLint -> GLint -> Ptr (c GLfloat) -> GLint -> GLint -> IO ()
class TrimmingPoint p
nurbsBeginEndTrim :: NURBSObj -> IO a -> IO a
pwlCurve :: TrimmingPoint p => NURBSObj -> GLint -> Ptr (p GLfloat) -> GLint -> IO ()
trimmingCurve :: TrimmingPoint c => NURBSObj -> GLint -> Ptr GLfloat -> GLint -> Ptr (c GLfloat) -> GLint -> IO ()
data NURBSMode
NURBSTessellator :: NURBSMode
NURBSRenderer :: NURBSMode
setNURBSMode :: NURBSObj -> NURBSMode -> IO ()
setNURBSCulling :: NURBSObj -> Capability -> IO ()
data SamplingMethod
PathLength :: GLfloat -> SamplingMethod
ParametricError :: GLfloat -> SamplingMethod
DomainDistance :: GLfloat -> GLfloat -> SamplingMethod
ObjectPathLength :: GLfloat -> SamplingMethod
ObjectParametricError :: GLfloat -> SamplingMethod
setSamplingMethod :: NURBSObj -> SamplingMethod -> IO ()
loadSamplingMatrices :: (Matrix m1, Matrix m2) => NURBSObj -> Maybe (m1 GLfloat, m2 GLfloat, (Position, Size)) -> IO ()
data DisplayMode'
Fill' :: DisplayMode'
OutlinePolygon :: DisplayMode'
OutlinePatch :: DisplayMode'
setDisplayMode' :: NURBSObj -> DisplayMode' -> IO ()
instance Eq NURBSMode
instance Ord NURBSMode
instance Show NURBSMode
instance Eq SamplingMethod
instance Ord SamplingMethod
instance Show SamplingMethod
instance Eq DisplayMode'
instance Ord DisplayMode'
instance Show DisplayMode'
instance TrimmingPoint Vertex3
instance TrimmingPoint Vertex2


-- | A Haskell binding for GLU, OpenGL's accompanying utility library.
module Graphics.Rendering.OpenGL.GLU


-- | This module corresponds to section 3.2 (Antialiasing) of the OpenGL
--   2.1 specs.
module Graphics.Rendering.OpenGL.GL.Antialiasing
sampleBuffers :: GettableStateVar GLsizei
samples :: GettableStateVar GLsizei
multisample :: StateVar Capability
subpixelBits :: GettableStateVar GLsizei


-- | A Haskell binding for OpenGL, the industry's most widely used and
--   supported 2D and 3D graphics API.
module Graphics.Rendering.OpenGL.GL


-- | A convenience module, combining the Haskell bindings for GL and GLU.
module Graphics.Rendering.OpenGL
