-- 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 3.2) 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
--   and its various extensions, please see <a>http://www.opengl.org/</a>
--   and <a>http://www.opengl.org/registry/</a>.
@package OpenGL
@version 2.8.0.0


-- | This is a purely internal module for auxiliary vertex attributes.
module Graphics.Rendering.OpenGL.GL.VertexAttributes

-- | 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
data Normal3 a
Normal3 :: !a -> !a -> !a -> Normal3 a

-- | A fog coordinate.
newtype FogCoord1 a
FogCoord1 :: a -> FogCoord1 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

-- | A color index.
newtype Index1 a
Index1 :: a -> Index1 a
instance Typeable1 TexCoord1
instance Typeable1 TexCoord2
instance Typeable1 TexCoord3
instance Typeable1 TexCoord4
instance Typeable1 Normal3
instance Typeable1 FogCoord1
instance Typeable1 Color3
instance Typeable1 Color4
instance Typeable1 Index1
instance Eq a => Eq (TexCoord1 a)
instance Ord a => Ord (TexCoord1 a)
instance Ix a => Ix (TexCoord1 a)
instance Bounded a => Bounded (TexCoord1 a)
instance Show a => Show (TexCoord1 a)
instance Read a => Read (TexCoord1 a)
instance Eq a => Eq (TexCoord2 a)
instance Ord a => Ord (TexCoord2 a)
instance Ix a => Ix (TexCoord2 a)
instance Bounded a => Bounded (TexCoord2 a)
instance Show a => Show (TexCoord2 a)
instance Read a => Read (TexCoord2 a)
instance Eq a => Eq (TexCoord3 a)
instance Ord a => Ord (TexCoord3 a)
instance Ix a => Ix (TexCoord3 a)
instance Bounded a => Bounded (TexCoord3 a)
instance Show a => Show (TexCoord3 a)
instance Read a => Read (TexCoord3 a)
instance Eq a => Eq (TexCoord4 a)
instance Ord a => Ord (TexCoord4 a)
instance Ix a => Ix (TexCoord4 a)
instance Bounded a => Bounded (TexCoord4 a)
instance Show a => Show (TexCoord4 a)
instance Read a => Read (TexCoord4 a)
instance Eq a => Eq (Normal3 a)
instance Ord a => Ord (Normal3 a)
instance Ix a => Ix (Normal3 a)
instance Bounded a => Bounded (Normal3 a)
instance Show a => Show (Normal3 a)
instance Read a => Read (Normal3 a)
instance Eq a => Eq (FogCoord1 a)
instance Ord a => Ord (FogCoord1 a)
instance Ix a => Ix (FogCoord1 a)
instance Bounded a => Bounded (FogCoord1 a)
instance Show a => Show (FogCoord1 a)
instance Read a => Read (FogCoord1 a)
instance Eq a => Eq (Color3 a)
instance Ord a => Ord (Color3 a)
instance Ix a => Ix (Color3 a)
instance Bounded a => Bounded (Color3 a)
instance Show a => Show (Color3 a)
instance Read a => Read (Color3 a)
instance Eq a => Eq (Color4 a)
instance Ord a => Ord (Color4 a)
instance Ix a => Ix (Color4 a)
instance Bounded a => Bounded (Color4 a)
instance Show a => Show (Color4 a)
instance Read a => Read (Color4 a)
instance Eq a => Eq (Index1 a)
instance Ord a => Ord (Index1 a)
instance Ix a => Ix (Index1 a)
instance Bounded a => Bounded (Index1 a)
instance Show a => Show (Index1 a)
instance Read a => Read (Index1 a)
instance Storable a => Storable (Index1 a)
instance Traversable Index1
instance Foldable Index1
instance Applicative Index1
instance Functor Index1
instance Storable a => Storable (Color4 a)
instance Traversable Color4
instance Foldable Color4
instance Applicative Color4
instance Functor Color4
instance Storable a => Storable (Color3 a)
instance Traversable Color3
instance Foldable Color3
instance Applicative Color3
instance Functor Color3
instance Storable a => Storable (FogCoord1 a)
instance Traversable FogCoord1
instance Foldable FogCoord1
instance Applicative FogCoord1
instance Functor FogCoord1
instance Storable a => Storable (Normal3 a)
instance Traversable Normal3
instance Foldable Normal3
instance Applicative Normal3
instance Functor Normal3
instance Storable a => Storable (TexCoord4 a)
instance Traversable TexCoord4
instance Foldable TexCoord4
instance Applicative TexCoord4
instance Functor TexCoord4
instance Storable a => Storable (TexCoord3 a)
instance Traversable TexCoord3
instance Foldable TexCoord3
instance Applicative TexCoord3
instance Functor TexCoord3
instance Storable a => Storable (TexCoord2 a)
instance Traversable TexCoord2
instance Foldable TexCoord2
instance Applicative TexCoord2
instance Functor TexCoord2
instance Storable a => Storable (TexCoord1 a)
instance Traversable TexCoord1
instance Foldable TexCoord1
instance Applicative TexCoord1
instance Functor TexCoord1


-- | This is a purely internal module for setting point parameters.
module Graphics.Rendering.OpenGL.GL.PointParameter
data PointParameter
PointSizeMin :: PointParameter
PointSizeMax :: PointParameter
PointFadeThresholdSize :: PointParameter
PointDistanceAttenuation :: PointParameter
pointParameterf :: PointParameter -> GLfloat -> IO ()
pointParameterfv :: PointParameter -> Ptr GLfloat -> IO ()


-- | This is a purely internal module for (un-)marshaling PixelFormat.
module Graphics.Rendering.OpenGL.GL.PixelFormat
data PixelFormat
ColorIndex :: PixelFormat
StencilIndex :: PixelFormat
DepthComponent :: PixelFormat
DepthStencil :: PixelFormat
Red :: PixelFormat
Green :: PixelFormat
Blue :: PixelFormat
Alpha :: PixelFormat
RG :: PixelFormat
RGB :: PixelFormat
RGBA :: PixelFormat
Luminance :: PixelFormat
LuminanceAlpha :: PixelFormat
RedInteger :: PixelFormat
GreenInteger :: PixelFormat
BlueInteger :: PixelFormat
AlphaInteger :: PixelFormat
RGInteger :: PixelFormat
RGBInteger :: PixelFormat
RGBAInteger :: PixelFormat
BGRInteger :: PixelFormat
BGRAInteger :: PixelFormat
ABGR :: PixelFormat
BGR :: PixelFormat
BGRA :: PixelFormat
CMYK :: PixelFormat
CMYKA :: PixelFormat
FourTwoTwo :: PixelFormat
FourTwoTwoRev :: PixelFormat
FourTwoTwoAverage :: PixelFormat
FourTwoTwoRevAverage :: PixelFormat
YCBCR422 :: PixelFormat
marshalPixelFormat :: PixelFormat -> GLenum
unmarshalPixelFormat :: GLenum -> PixelFormat
instance Eq PixelFormat
instance Ord PixelFormat
instance Show PixelFormat


-- | This is a purely internal module for (un-)marshaling
--   PixelInternalFormat.
module Graphics.Rendering.OpenGL.GL.Texturing.PixelInternalFormat
data PixelInternalFormat
Alpha' :: PixelInternalFormat
DepthComponent' :: PixelInternalFormat
Luminance' :: PixelInternalFormat
LuminanceAlpha' :: PixelInternalFormat
Intensity :: PixelInternalFormat
R8 :: PixelInternalFormat
R16 :: PixelInternalFormat
RG8 :: PixelInternalFormat
RG16 :: 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
R16F :: PixelInternalFormat
RG16F :: PixelInternalFormat
RGB16F :: PixelInternalFormat
RGBA16F :: PixelInternalFormat
R32F :: PixelInternalFormat
RG32F :: PixelInternalFormat
RGB32F :: PixelInternalFormat
RGBA32F :: PixelInternalFormat
R8I :: PixelInternalFormat
R8UI :: PixelInternalFormat
R16I :: PixelInternalFormat
R16UI :: PixelInternalFormat
R32I :: PixelInternalFormat
R32UI :: PixelInternalFormat
RG8I :: PixelInternalFormat
RG8UI :: PixelInternalFormat
RG16I :: PixelInternalFormat
RG16UI :: PixelInternalFormat
RG32I :: PixelInternalFormat
RG32UI :: PixelInternalFormat
RGB8I :: PixelInternalFormat
RGB8UI :: PixelInternalFormat
RGB16I :: PixelInternalFormat
RGB16UI :: PixelInternalFormat
RGB32I :: PixelInternalFormat
RGB32UI :: PixelInternalFormat
RGBA8I :: PixelInternalFormat
RGBA8UI :: PixelInternalFormat
RGBA16I :: PixelInternalFormat
RGBA16UI :: PixelInternalFormat
RGBA32I :: PixelInternalFormat
RGBA32UI :: PixelInternalFormat
SLuminance8 :: PixelInternalFormat
SLuminance8Alpha8 :: PixelInternalFormat
CompressedAlpha :: PixelInternalFormat
CompressedLuminance :: PixelInternalFormat
CompressedLuminanceAlpha :: PixelInternalFormat
CompressedIntensity :: PixelInternalFormat
CompressedRed :: PixelInternalFormat
CompressedRG :: PixelInternalFormat
CompressedRGB :: PixelInternalFormat
CompressedRGBA :: PixelInternalFormat
CompressedSRGB :: PixelInternalFormat
CompressedSRGBAlpha :: PixelInternalFormat
CompressedSLuminance :: PixelInternalFormat
CompressedSLuminanceAlpha :: PixelInternalFormat
CompressedRedRGTC1 :: PixelInternalFormat
CompressedSignedRedRGTC1 :: PixelInternalFormat
CompressedRG_RGTC2 :: PixelInternalFormat
CompressedSignedRG_RGTC2 :: PixelInternalFormat
DepthComponent32f :: PixelInternalFormat
Depth32fStencil8 :: PixelInternalFormat
RGB9E5 :: PixelInternalFormat
R11fG11fB10f :: PixelInternalFormat
StencilIndex1 :: PixelInternalFormat
StencilIndex4 :: PixelInternalFormat
StencilIndex8 :: PixelInternalFormat
StencilIndex16 :: PixelInternalFormat
marshalPixelInternalFormat :: PixelInternalFormat -> GLint
marshalPixelInternalFormat' :: PixelInternalFormat -> GLenum
unmarshalPixelInternalFormat :: GLint -> PixelInternalFormat
instance Eq PixelInternalFormat
instance Ord PixelInternalFormat
instance Show PixelInternalFormat


-- | This is a purely internal module for (un-)marshaling
--   ComparisonFunction.
module Graphics.Rendering.OpenGL.GL.ComparisonFunction
data ComparisonFunction
Never :: ComparisonFunction
Less :: ComparisonFunction
Equal :: ComparisonFunction
Lequal :: ComparisonFunction
Greater :: ComparisonFunction
Notequal :: ComparisonFunction
Gequal :: ComparisonFunction
Always :: ComparisonFunction
marshalComparisonFunction :: ComparisonFunction -> GLenum
unmarshalComparisonFunction :: GLenum -> ComparisonFunction
instance Eq ComparisonFunction
instance Ord ComparisonFunction
instance Show ComparisonFunction


-- | This is a purely internal module for (un-)marshaling BlendingFactor.
module Graphics.Rendering.OpenGL.GL.BlendingFactor
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
marshalBlendingFactor :: BlendingFactor -> GLenum
unmarshalBlendingFactor :: GLenum -> BlendingFactor
instance Eq BlendingFactor
instance Ord BlendingFactor
instance Show BlendingFactor


-- | This is a purely internal module for (un-)marshaling BufferMode.
module Graphics.Rendering.OpenGL.GL.BufferMode

-- | 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

-- | Only the given color attachment of the bound framebufferobject is
--   selected for reading or writing.
FBOColorAttachment :: GLsizei -> BufferMode
marshalBufferMode :: BufferMode -> Maybe GLenum
unmarshalBufferMode :: GLenum -> BufferMode
unmarshalBufferModeSafe :: GLenum -> Maybe BufferMode
maxColorAttachments :: GLenum
instance Eq BufferMode
instance Ord BufferMode
instance Show BufferMode


-- | 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 ()


-- | This is a purely internal module for an IO monad with a pointer as an
--   additional state, basically a <i>StateT (Ptr s) IO a</i>.
module Graphics.Rendering.OpenGL.GL.IOState
newtype IOState s a
IOState :: (Ptr s -> IO (a, Ptr s)) -> IOState s a
runIOState :: IOState s a -> Ptr s -> IO (a, Ptr s)
getIOState :: IOState s (Ptr s)
peekIOState :: Storable a => IOState a a
evalIOState :: IOState s a -> Ptr s -> IO a
nTimes :: Integral a => a -> IOState b c -> IOState b [c]
instance Monad (IOState s)
instance Functor (IOState s)


-- | This is a purely internal module for (un-)marshaling PolygonMode.
module Graphics.Rendering.OpenGL.GL.PolygonMode
data PolygonMode
Point :: PolygonMode
Line :: PolygonMode
Fill :: PolygonMode
marshalPolygonMode :: PolygonMode -> GLenum
unmarshalPolygonMode :: GLenum -> PolygonMode
instance Eq PolygonMode
instance Ord PolygonMode
instance Show PolygonMode


-- | This is a purely internal module for (un-)marshaling DataType.
module Graphics.Rendering.OpenGL.GL.DataType
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
marshalDataType :: DataType -> GLenum
unmarshalDataType :: GLenum -> DataType
data DataTypeType
TNone :: DataTypeType
TSignedNormalized :: DataTypeType
TUnsignedNormalized :: DataTypeType
TFloat :: DataTypeType
TInt :: DataTypeType
TUnsignedInt :: DataTypeType
marshalDataTypeType :: DataTypeType -> GLenum
unmarshalDataTypeType :: GLenum -> DataTypeType
instance Eq DataType
instance Ord DataType
instance Show DataType


-- | This is a purely internal helper module.
module Graphics.Rendering.OpenGL.GL.PixelData
data PixelData a
PixelData :: PixelFormat -> DataType -> (Ptr a) -> PixelData a
withPixelData :: PixelData a -> (GLenum -> GLenum -> Ptr a -> b) -> b
instance Eq (PixelData a)
instance Ord (PixelData a)
instance Show (PixelData a)


-- | This is a purely internal module for (un-)marshaling TextureUnit.
module Graphics.Rendering.OpenGL.GL.Texturing.TextureUnit

-- | Identifies a texture unit via its number, which must be in the range
--   of (0 .. <tt>maxTextureUnit</tt>).
newtype TextureUnit
TextureUnit :: GLuint -> TextureUnit
marshalTextureUnit :: TextureUnit -> GLenum
unmarshalTextureUnit :: GLenum -> TextureUnit
instance Eq TextureUnit
instance Ord TextureUnit
instance Show TextureUnit
instance Storable TextureUnit


-- | This is a purely internal module for (un-)marshaling Face.
module Graphics.Rendering.OpenGL.GL.Face
data Face
Front :: Face
Back :: Face
FrontAndBack :: Face
marshalFace :: Face -> GLenum
unmarshalFace :: GLenum -> Face
instance Eq Face
instance Ord Face
instance Show Face


-- | This is a purely internal module corresponding to some parts of
--   section 2.5 (GL Errors) of the OpenGL 2.1 specs and chapter 8 (Errors)
--   of the GLU specs.
module Graphics.Rendering.OpenGL.GLU.ErrorsInternal

-- | 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
getErrors :: IO [Error]
recordErrorCode :: GLenum -> IO ()
recordInvalidEnum :: IO ()
recordInvalidValue :: IO ()
recordOutOfMemory :: IO ()
instance Eq ErrorCategory
instance Ord ErrorCategory
instance Show ErrorCategory
instance Eq Error
instance Ord Error
instance Show Error


-- | This is a purely internal module with peek- and poke-related
--   utilities.
module Graphics.Rendering.OpenGL.GL.PeekPoke
poke1 :: Storable a => Ptr a -> a -> IO ()
poke2 :: Storable a => Ptr a -> a -> a -> IO ()
poke3 :: Storable a => Ptr a -> a -> a -> a -> IO ()
poke4 :: Storable a => Ptr a -> a -> a -> a -> a -> IO ()
peek1 :: Storable a => (a -> b) -> Ptr a -> IO b
peek2 :: Storable a => (a -> a -> b) -> Ptr a -> IO b
peek3 :: Storable a => (a -> a -> a -> b) -> Ptr a -> IO b
peek4 :: Storable a => (a -> a -> a -> a -> b) -> Ptr a -> IO b
peek1M :: Storable a => (a -> IO b) -> Ptr a -> IO b
peek2M :: Storable a => (a -> a -> IO b) -> Ptr a -> IO b
peek3M :: Storable a => (a -> a -> a -> IO b) -> Ptr a -> IO b
peek4M :: Storable a => (a -> a -> a -> a -> IO b) -> Ptr a -> IO b


module Graphics.Rendering.OpenGL.GL.QueryUtils.PName
class GetPName p
marshalGetPName :: GetPName p => p -> Maybe GLenum
class GetPName p => GetPName1I p where getBoolean1 = get1 getBooleanv getInteger1 = get1 getIntegerv getEnum1 = get1 getIntegerv getSizei1 = get1 getIntegerv
getBoolean1 :: GetPName1I p => (GLboolean -> a) -> p -> IO a
getInteger1 :: GetPName1I p => (GLint -> a) -> p -> IO a
getEnum1 :: GetPName1I p => (GLenum -> a) -> p -> IO a
getSizei1 :: GetPName1I p => (GLsizei -> a) -> p -> IO a
class GetPName p => GetPName1F p where getFloat1 = get1 getFloatv getClampf1 = get1 getFloatv getDouble1 = get1 getDoublev getClampd1 = get1 getDoublev
getFloat1 :: GetPName1F p => (GLfloat -> a) -> p -> IO a
getClampf1 :: GetPName1F p => (GLclampf -> a) -> p -> IO a
getDouble1 :: GetPName1F p => (GLdouble -> a) -> p -> IO a
getClampd1 :: GetPName1F p => (GLclampd -> a) -> p -> IO a
class GetPName p => GetIPName1I p where getBoolean1i = get1i getBooleaniv getInteger1i = get1i getIntegeriv getEnum1i = get1i getIntegeriv getSizei1i = get1i getIntegeriv
getBoolean1i :: GetIPName1I p => (GLboolean -> a) -> p -> GLuint -> IO a
getInteger1i :: GetIPName1I p => (GLint -> a) -> p -> GLuint -> IO a
getEnum1i :: GetIPName1I p => (GLenum -> a) -> p -> GLuint -> IO a
getSizei1i :: GetIPName1I p => (GLsizei -> a) -> p -> GLuint -> IO a
class GetPName p => GetPName2I p where getBoolean2 = get2 getBooleanv getInteger2 = get2 getIntegerv getEnum2 = get2 getIntegerv getSizei2 = get2 getIntegerv
getBoolean2 :: GetPName2I p => (GLboolean -> GLboolean -> a) -> p -> IO a
getInteger2 :: GetPName2I p => (GLint -> GLint -> a) -> p -> IO a
getEnum2 :: GetPName2I p => (GLenum -> GLenum -> a) -> p -> IO a
getSizei2 :: GetPName2I p => (GLsizei -> GLsizei -> a) -> p -> IO a
class GetPName p => GetPName2F p where getFloat2 = get2 getFloatv getClampf2 = get2 getFloatv getDouble2 = get2 getDoublev getClampd2 = get2 getDoublev
getFloat2 :: GetPName2F p => (GLfloat -> GLfloat -> a) -> p -> IO a
getClampf2 :: GetPName2F p => (GLclampf -> GLclampf -> a) -> p -> IO a
getDouble2 :: GetPName2F p => (GLdouble -> GLdouble -> a) -> p -> IO a
getClampd2 :: GetPName2F p => (GLclampd -> GLclampd -> a) -> p -> IO a
class GetPName p => GetPName3I p where getBoolean3 = get3 getBooleanv getInteger3 = get3 getIntegerv getEnum3 = get3 getIntegerv getSizei3 = get3 getIntegerv
getBoolean3 :: GetPName3I p => (GLboolean -> GLboolean -> GLboolean -> a) -> p -> IO a
getInteger3 :: GetPName3I p => (GLint -> GLint -> GLint -> a) -> p -> IO a
getEnum3 :: GetPName3I p => (GLenum -> GLenum -> GLenum -> a) -> p -> IO a
getSizei3 :: GetPName3I p => (GLsizei -> GLsizei -> GLsizei -> a) -> p -> IO a
class GetPName p => GetPName3F p where getFloat3 = get3 getFloatv getClampf3 = get3 getFloatv getDouble3 = get3 getDoublev getClampd3 = get3 getDoublev
getFloat3 :: GetPName3F p => (GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
getClampf3 :: GetPName3F p => (GLclampf -> GLclampf -> GLclampf -> a) -> p -> IO a
getDouble3 :: GetPName3F p => (GLdouble -> GLdouble -> GLdouble -> a) -> p -> IO a
getClampd3 :: GetPName3F p => (GLclampd -> GLclampd -> GLclampd -> a) -> p -> IO a
class GetPName p => GetPName4I p where getBoolean4 = get4 getBooleanv getInteger4 = get4 getIntegerv getEnum4 = get4 getIntegerv getSizei4 = get4 getIntegerv
getBoolean4 :: GetPName4I p => (GLboolean -> GLboolean -> GLboolean -> GLboolean -> a) -> p -> IO a
getInteger4 :: GetPName4I p => (GLint -> GLint -> GLint -> GLint -> a) -> p -> IO a
getEnum4 :: GetPName4I p => (GLenum -> GLenum -> GLenum -> GLenum -> a) -> p -> IO a
getSizei4 :: GetPName4I p => (GLsizei -> GLsizei -> GLsizei -> GLsizei -> a) -> p -> IO a
class GetPName p => GetPName4F p where getFloat4 = get4 getFloatv getClampf4 = get4 getFloatv getDouble4 = get4 getDoublev getClampd4 = get4 getDoublev
getFloat4 :: GetPName4F p => (GLfloat -> GLfloat -> GLfloat -> GLfloat -> a) -> p -> IO a
getClampf4 :: GetPName4F p => (GLclampf -> GLclampf -> GLclampf -> GLclampf -> a) -> p -> IO a
getDouble4 :: GetPName4F p => (GLdouble -> GLdouble -> GLdouble -> GLdouble -> a) -> p -> IO a
getClampd4 :: GetPName4F p => (GLclampd -> GLclampd -> GLclampd -> GLclampd -> a) -> p -> IO a
class GetPName p => GetIPName4I p where getBoolean4i = get4i getBooleaniv getInteger4i = get4i getIntegeriv getEnum4i = get4i getIntegeriv getSizei4i = get4i getIntegeriv
getBoolean4i :: GetIPName4I p => (GLboolean -> GLboolean -> GLboolean -> GLboolean -> a) -> p -> GLuint -> IO a
getInteger4i :: GetIPName4I p => (GLint -> GLint -> GLint -> GLint -> a) -> p -> GLuint -> IO a
getEnum4i :: GetIPName4I p => (GLenum -> GLenum -> GLenum -> GLenum -> a) -> p -> GLuint -> IO a
getSizei4i :: GetIPName4I p => (GLsizei -> GLsizei -> GLsizei -> GLsizei -> a) -> p -> GLuint -> IO a
class GetPName p => GetPNameNI p where getIntegerN f p n = allocaArray n $ \ buf -> do { getIntegerv p buf; (map f) `fmap` peekArray n buf }
getIntegerN :: GetPNameNI p => (GLint -> a) -> p -> Int -> IO [a]
data PName1I

-- | bool
GetEdgeFlag :: PName1I

-- | enum
GetRGBAMode :: PName1I

-- | int
GetCurrentIndex :: PName1I

-- | enum displaylist
GetMaxTextureUnits :: PName1I

-- | enum
GetListIndex :: PName1I

-- | enum
GetListMode :: PName1I

-- | sizei
GetMaxListNesting :: PName1I

-- | enum rendermode
GetListBase :: PName1I

-- | enum framebufferbinding
GetRenderMode :: PName1I

-- | int
GetDrawFramebufferBinding :: PName1I

-- | int
GetReadFramebufferBinding :: PName1I

-- | int renderbufferbinding
GetFramebufferBinding :: PName1I

-- | int hint
GetRenderbufferBinding :: PName1I

-- | enum
GetPerspectiveCorrectionHint :: PName1I

-- | enum
GetPointSmoothHint :: PName1I

-- | enum
GetLineSmoothHint :: PName1I

-- | enum
GetPolygonSmoothHint :: PName1I

-- | enum
GetFogHint :: PName1I

-- | enum
GetGenerateMipmapHint :: PName1I

-- | enum
GetTextureCompressionHint :: PName1I

-- | enum
GetPackCMYKHint :: PName1I

-- | enum vertexarray
GetUnpackCMYKHint :: PName1I

-- | int Selction?
GetVertexArrayBinding :: PName1I

-- | int
GetMaxNameStackDepth :: PName1I

-- | int ContextProfile
GetNameStackDepth :: PName1I

-- | enum pixelStorage
GetContextProfileMask :: PName1I

-- | bool
GetPackSwapBytes :: PName1I

-- | bool
GetUnpackSwapBytes :: PName1I

-- | bool
GetPackLSBFirst :: PName1I

-- | bool
GetUnpackLSBFirst :: PName1I

-- | int
GetPackRowLength :: PName1I

-- | int
GetUnpackRowLength :: PName1I

-- | int
GetPackSkipRows :: PName1I

-- | int
GetUnpackSkipRows :: PName1I

-- | int
GetPackSkipPixels :: PName1I

-- | int
GetUnpackSkipPixels :: PName1I

-- | int
GetPackAlignment :: PName1I

-- | int
GetUnpackAlignment :: PName1I

-- | int
GetPackImageHeight :: PName1I

-- | int
GetUnpackImageHeight :: PName1I

-- | int
GetPackSkipImages :: PName1I

-- | int pixel map
GetUnpackSkipImages :: PName1I

-- | int
GetPixelMapIToISize :: PName1I

-- | int
GetPixelMapSToSSize :: PName1I

-- | int
GetPixelMapIToRSize :: PName1I

-- | int
GetPixelMapIToGSize :: PName1I

-- | int
GetPixelMapIToBSize :: PName1I

-- | int
GetPixelMapIToASize :: PName1I

-- | int
GetPixelMapRToRSize :: PName1I

-- | int
GetPixelMapGToGSize :: PName1I

-- | int
GetPixelMapBToBSize :: PName1I

-- | int
GetPixelMapAToASize :: PName1I

-- | sizei shader limits
GetMaxPixelMapTable :: PName1I

-- | sizei
GetMaxVertexTextureImageUnits :: PName1I

-- | sizei
GetMaxTextureImageUnits :: PName1I

-- | sizei
GetMaxCombinedTextureImageUnits :: PName1I

-- | sizei
GetMaxTextureCoords :: PName1I

-- | sizei
GetMaxVertexUniformComponents :: PName1I

-- | sizei
GetMaxFragmentUniformComponents :: PName1I

-- | sizei
GetMaxVertexAttribs :: PName1I

-- | sizei coordtrans
GetMaxVaryingFloats :: PName1I

-- | enum
GetMatrixMode :: PName1I

-- | sizei
GetModelviewStackDepth :: PName1I

-- | sizei
GetProjectionStackDepth :: PName1I

-- | sizei
GetTextureStackDepth :: PName1I

-- | sizei
GetColorMatrixStackDepth :: PName1I

-- | sizei
GetMaxModelviewStackDepth :: PName1I

-- | sizei
GetMaxProjectionStackDepth :: PName1I

-- | sizei
GetMaxTextureStackDepth :: PName1I

-- | sizei
GetMaxColorMatrixStackDepth :: PName1I

-- | sizei
GetMaxMatrixPaletteStackDepth :: PName1I

-- | sizei
GetCurrentMatrixStackDepth :: PName1I

-- | enum VertexArrays
GetActiveTexture :: PName1I

-- | int
GetVertexArraySize :: PName1I

-- | enum
GetVertexArrayType :: PName1I

-- | int
GetVertexArrayStride :: PName1I

-- | enum
GetNormalArrayType :: PName1I

-- | int
GetNormalArrayStride :: PName1I

-- | int
GetColorArraySize :: PName1I

-- | enum
GetColorArrayType :: PName1I

-- | int
GetColorArrayStride :: PName1I

-- | enum
GetIndexArrayType :: PName1I

-- | int
GetIndexArrayStride :: PName1I

-- | int
GetTextureCoordArraySize :: PName1I

-- | enum
GetTextureCoordArrayType :: PName1I

-- | int
GetTextureCoordArrayStride :: PName1I

-- | int
GetEdgeFlagArrayStride :: PName1I

-- | enum
GetFogCoordArrayType :: PName1I

-- | int
GetFogCoordArrayStride :: PName1I

-- | int
GetSecondaryColorArraySize :: PName1I

-- | enum
GetSecondaryColorArrayType :: PName1I

-- | int
GetSecondaryColorArrayStride :: PName1I

-- | int
GetArrayElementLockCount :: PName1I

-- | int
GetArrayElementLockFirst :: PName1I

-- | enum
GetClientActiveTexture :: PName1I

-- | sizei
GetMaxElementsVertices :: PName1I

-- | sizei
GetMaxElementsIndices :: PName1I

-- | int
GetPrimitiveRestartIndex :: PName1I

-- | bool
GetPrimitiveRestartNV :: PName1I

-- | int bufferObjects
GetPrimitiveRestartIndexNV :: PName1I

-- | int
GetArrayBufferBinding :: PName1I

-- | int
GetElementArrayBufferBinding :: PName1I

-- | int
GetCopyReadBuffer :: PName1I

-- | int
GetCopyWriteBuffer :: PName1I

-- | int
GetPixelPackBufferBinding :: PName1I

-- | int
GetPixelUnpackBufferBinding :: PName1I

-- | int
GetTransformFeedbackBufferBinding :: PName1I

-- | int
GetVertexArrayBufferBinding :: PName1I

-- | int
GetNormalArrayBufferBinding :: PName1I

-- | int
GetColorArrayBufferBinding :: PName1I

-- | int
GetIndexArrayBufferBinding :: PName1I

-- | int
GetTextureCoordArrayBufferBinding :: PName1I

-- | int
GetEdgeFlagArrayBufferBinding :: PName1I

-- | int
GetSecondaryColorArrayBufferBinding :: PName1I

-- | int clipping
GetFogCoordArrayBufferBinding :: PName1I

-- | sizei Colors
GetMaxClipPlanes :: PName1I

-- | sizei
GetMaxLights :: PName1I

-- | enum
GetFrontFace :: PName1I

-- | bool
GetLightModelLocalViewer :: PName1I

-- | bool
GetLightModelTwoSide :: PName1I

-- | enum
GetLightModelColorControl :: PName1I

-- | enum
GetColorMaterialFace :: PName1I

-- | enum
GetColorMaterialParameter :: PName1I

-- | enum
GetShadeModel :: PName1I

-- | enum
GetFragmentColorClamp :: PName1I

-- | enum
GetVertexColorClamp :: PName1I

-- | enum Evaluators
GetReadColorClamp :: PName1I

-- | int
GetMaxEvalOrder :: PName1I

-- | int Fog
GetMap1GridSegments :: PName1I

-- | int =&gt; enum
GetFogMode :: PName1I

-- | int
GetFogIndex :: PName1I

-- | int
GetFogCoordSrc :: PName1I

-- | int =&gt; enum Framebuffer
GetFogDistanceMode :: PName1I

-- | sizei
GetAuxBuffers :: PName1I

-- | bool
GetDoublebuffer :: PName1I

-- | bool
GetStereo :: PName1I

-- | sizei
GetRedBits :: PName1I

-- | sizei
GetGreenBits :: PName1I

-- | sizei
GetBlueBits :: PName1I

-- | sizei
GetAlphaBits :: PName1I

-- | sizei
GetStencilBits :: PName1I

-- | sizei
GetDepthBits :: PName1I

-- | sizei
GetAccumRedBits :: PName1I

-- | sizei
GetAccumGreenBits :: PName1I

-- | sizei
GetAccumBlueBits :: PName1I

-- | sizei
GetAccumAlphaBits :: PName1I

-- | enum
GetDrawBuffer :: PName1I
GetDrawBufferN :: GLsizei -> PName1I

-- | sizei
GetMaxDrawBuffers :: PName1I

-- | int
GetIndexWritemask :: PName1I

-- | bool
GetDepthWritemask :: PName1I

-- | bool
GetStencilWritemask :: PName1I

-- | int Program
GetStencilClearValue :: PName1I

-- | int Transformfeedback
GetCurrentProgram :: PName1I

-- | int
GetMaxTransformFeedbackSeparateAttribs :: PName1I

-- | int
GetMaxTransformFeedbackInterleavedComponents :: PName1I

-- | int
GetMaxTransformFeedbackSeparateComponents :: PName1I

-- | int
GetCurrentRasterIndex :: PName1I

-- | bool LineSegment
GetCurrentRasterPositionValid :: PName1I

-- | int
GetLineStippleRepeat :: PName1I

-- | int PerFragment
GetLineStipplePattern :: PName1I

-- | bool
GetSampleCoverageInvert :: PName1I

-- | enum
GetAlphaTestFunc :: PName1I

-- | enum
GetStencilFunc :: PName1I

-- | int
GetStencilValueMask :: PName1I

-- | int
GetStencilRef :: PName1I

-- | enum
GetStencilFail :: PName1I

-- | enum
GetStencilPassDepthFail :: PName1I

-- | enum
GetStencilPassDepthPass :: PName1I

-- | enum
GetActiveStencilFace :: PName1I

-- | enum
GetLogicOpMode :: PName1I

-- | enum
GetBlendDst :: PName1I

-- | enum
GetBlendSrc :: PName1I

-- | enum
GetBlendSrcRGB :: PName1I

-- | enum
GetBlendSrcAlpha :: PName1I

-- | enum
GetBlendDstRGB :: PName1I

-- | enum
GetBlendDstAlpha :: PName1I

-- | enum
GetBlendEquation :: PName1I

-- | enum
GetBlendEquationAlpha :: PName1I

-- | enum
GetDepthFunc :: PName1I

-- | bool
GetMapColor :: PName1I

-- | bool
GetMapStencil :: PName1I

-- | int
GetIndexShift :: PName1I

-- | int Polygons -- ^ enum
GetIndexOffset :: PName1I
GetCullFaceMode :: PName1I

-- | int
GetNumCompressedTextureFormats :: PName1I

-- | int
GetMaxTextureSize :: PName1I

-- | int
GetMax3DTextureSize :: PName1I

-- | int
GetMaxCubeMapTextureSize :: PName1I

-- | int ReadCopyPixels
GetMaxRectangleTextureSize :: PName1I

-- | enum Texture Objects
GetReadBuffer :: PName1I

-- | int/enum
GetTextureBinding1D :: PName1I

-- | int/enum
GetTextureBinding2D :: PName1I

-- | int/enum
GetTextureBinding3D :: PName1I

-- | int/enum
GetTextureBindingCubeMap :: PName1I

-- | int/enum Antialiasing
GetTextureBindingRectangle :: PName1I

-- | sizei
GetSubpixelBits :: PName1I

-- | sizei
GetSamples :: PName1I

-- | sizei
GetSampleBuffers :: PName1I
data PName1F

-- | Float1 Rasterization
GetCurrentFogCoord :: PName1F

-- | Float
GetZoomX :: PName1F

-- | Float Colors
GetZoomY :: PName1F

-- | Float
GetMaxShininess :: PName1F

-- | Float Fog
GetMaxSpotExponent :: PName1F

-- | float
GetFogStart :: PName1F

-- | float
GetFogEnd :: PName1F

-- | float Framebuffer
GetFogDensity :: PName1F

-- | clampf
GetDepthClearValue :: PName1F

-- | float RasterPos
GetIndexClearValue :: PName1F

-- | float Point
GetCurrentRasterDistance :: PName1F

-- | float
GetPointSizeMin :: PName1F

-- | float
GetPointSizeMax :: PName1F

-- | float
GetPointFadeThresholdSize :: PName1F

-- | float
GetSmoothPointSizeGranularity :: PName1F

-- | float LineSegment
GetPointSize :: PName1F

-- | float
GetLineWidth :: PName1F

-- | float PerFragment
GetSmoothLineWidthGranularity :: PName1F

-- | clampf
GetSampleCoverageValue :: PName1F

-- | clampf PixelTransfer
GetAlphaTestRef :: PName1F

-- | float
GetRedScale :: PName1F

-- | float
GetGreenScale :: PName1F

-- | float
GetBlueScale :: PName1F

-- | float
GetAlphaScale :: PName1F

-- | float
GetPostConvolutionRedScale :: PName1F

-- | float
GetPostConvolutionGreenScale :: PName1F

-- | float
GetPostConvolutionBlueScale :: PName1F

-- | float
GetPostConvolutionAlphaScale :: PName1F

-- | float
GetPostColorMatrixRedScale :: PName1F

-- | float
GetPostColorMatrixGreenScale :: PName1F

-- | float
GetPostColorMatrixBlueScale :: PName1F

-- | float
GetPostColorMatrixAlphaScale :: PName1F

-- | float
GetRedBias :: PName1F

-- | float
GetGreenBias :: PName1F

-- | float
GetBlueBias :: PName1F

-- | float
GetAlphaBias :: PName1F

-- | float
GetPostConvolutionRedBias :: PName1F

-- | float
GetPostConvolutionGreenBias :: PName1F

-- | float
GetPostConvolutionBlueBias :: PName1F

-- | float
GetPostConvolutionAlphaBias :: PName1F

-- | float
GetPostColorMatrixRedBias :: PName1F

-- | float
GetPostColorMatrixGreenBias :: PName1F

-- | float
GetPostColorMatrixBlueBias :: PName1F

-- | float
GetPostColorMatrixAlphaBias :: PName1F

-- | float
GetDepthScale :: PName1F

-- | float Polygons
GetDepthBias :: PName1F

-- | float
GetPolygonOffsetFactor :: PName1F

-- | float Texture parameters
GetPolygonOffsetUnits :: PName1F

-- | float
GetMaxTextureMaxAnisotropy :: PName1F

-- | float
GetMaxTextureLODBias :: PName1F
data IPName1I
GetTransformFeedbackBuffer :: IPName1I
GetTransformFeedbackBufferStart :: IPName1I
GetTransformFeedbackBufferSize :: IPName1I
data PName2I

-- | sizei Evaluators
GetMaxViewportDims :: PName2I
GetMap2GridSegments :: PName2I
GetPolygonMode :: PName2I
data PName2F

-- | clamp Evaluators
GetDepthRange :: PName2F

-- | float2? Point
GetMap1GridDomain :: PName2F

-- | float
GetAliasedPointSizeRange :: PName2F

-- | float LineSegments
GetSmoothPointSizeRange :: PName2F

-- | float
GetAliasedLineWidthRange :: PName2F

-- | float PerFragment
GetSmoothLineWidthRange :: PName2F

-- | clampd
GetDepthBounds :: PName2F
data PName3F

-- | Float3 Point
GetCurrentNormal :: PName3F

-- | float
GetPointDistanceAttenuation :: PName3F
data PName4I

-- | int Framebuffer
GetViewport :: PName4I

-- | int PerFragment
GetRGBASignedComponents :: PName4I

-- | int
GetScissorBox :: PName4I
data PName4F

-- | ?
GetCurrentColor :: PName4F

-- | Float
GetCurrentTextureCoords :: PName4F

-- | Float clipping
GetCurrentSecondaryColor :: PName4F

-- | double Colors
GetClipPlane :: GLsizei -> PName4F

-- | float Evaluators
GetLightModelAmbient :: PName4F

-- | float? Fog
GetMap2GridDomain :: PName4F

-- | clampf Framebuffer
GetFogColor :: PName4F

-- | clampf
GetColorClearValue :: PName4F

-- | float RasterPos
GetAccumClearValue :: PName4F

-- | float
GetCurrentRasterColor :: PName4F

-- | float
GetCurrentRasterSecondaryColor :: PName4F

-- | float
GetCurrentRasterTextureCoords :: PName4F

-- | float
GetCurrentRasterPosition :: PName4F

-- | clampf
GetBlendColor :: PName4F

-- | Both indexed and unindexed
data PName4ISemiIndexed

-- | bool
GetColorWritemask :: PName4ISemiIndexed
data PNameNI
GetCompressedTextureFormats :: PNameNI
class GetPName p => GetPNameMatrix p where getMatrixf = getFloatv getMatrixd = getDoublev
getMatrixf :: GetPNameMatrix p => p -> Ptr GLfloat -> IO ()
getMatrixd :: GetPNameMatrix p => p -> Ptr GLdouble -> IO ()
data PNameMatrix
GetModelviewMatrix :: PNameMatrix
GetProjectionMatrix :: PNameMatrix
GetTextureMatrix :: PNameMatrix
GetColorMatrix :: PNameMatrix
GetMatrixPalette :: PNameMatrix
clipPlaneIndexToEnum :: GLsizei -> Maybe GLenum
instance GetPName PNameMatrix
instance GetPNameMatrix PNameMatrix
instance GetPName PNameNI
instance GetPNameNI PNameNI
instance GetPName PName4F
instance GetPName4F PName4F
instance GetPName PName4ISemiIndexed
instance GetIPName4I PName4ISemiIndexed
instance GetPName4I PName4ISemiIndexed
instance GetPName PName4I
instance GetPName4I PName4I
instance GetPName PName3F
instance GetPName3F PName3F
instance GetPName PName2F
instance GetPName2F PName2F
instance GetPName PName2I
instance GetPName2I PName2I
instance GetPName IPName1I
instance GetIPName1I IPName1I
instance GetPName PName1F
instance GetPName1F PName1F
instance GetPName PName1I
instance GetPName1I PName1I


module Graphics.Rendering.OpenGL.GL.QueryUtils.VertexAttrib
newtype AttribLocation
AttribLocation :: GLuint -> AttribLocation
data GetVertexAttribPName
GetVertexAttribArrayEnabled :: GetVertexAttribPName
GetVertexAttribArraySize :: GetVertexAttribPName
GetVertexAttribArrayStride :: GetVertexAttribPName
GetVertexAttribArrayType :: GetVertexAttribPName
GetVertexAttribArrayNormalized :: GetVertexAttribPName
GetCurrentVertexAttrib :: GetVertexAttribPName
GetVertexAttribArrayBufferBinding :: GetVertexAttribPName
GetVertexAttribArrayInteger :: GetVertexAttribPName
getVertexAttribInteger1 :: (GLint -> b) -> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribEnum1 :: (GLenum -> b) -> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribBoolean1 :: (GLboolean -> b) -> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribFloat4 :: (GLfloat -> GLfloat -> GLfloat -> GLfloat -> b) -> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribIInteger4 :: (GLint -> GLint -> GLint -> GLint -> b) -> AttribLocation -> GetVertexAttribPName -> IO b
getVertexAttribIuInteger4 :: (GLuint -> GLuint -> GLuint -> GLuint -> b) -> AttribLocation -> GetVertexAttribPName -> IO b
data GetVertexAttribPointerPName
VertexAttribArrayPointer :: GetVertexAttribPointerPName
getVertexAttribPointer :: AttribLocation -> GetVertexAttribPointerPName -> IO (Ptr a)
instance Eq AttribLocation
instance Ord AttribLocation
instance Show AttribLocation


-- | This is a purely internal module for (un-)marshaling GLboolean.
module Graphics.Rendering.OpenGL.GL.GLboolean
marshalGLboolean :: Num a => Bool -> a
unmarshalGLboolean :: (Eq a, Num a) => a -> Bool


-- | This is a purely internal module for (un-)marshaling Reset.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Reset
data Reset
NoReset :: Reset
Reset :: Reset
marshalReset :: Reset -> GLboolean
instance Eq Reset
instance Ord Reset
instance Show Reset


-- | This is a purely internal module for (un-)marshaling Sink.
module Graphics.Rendering.OpenGL.GL.PixelRectangles.Sink
data Sink
PassThrough :: Sink
Sink :: Sink
marshalSink :: Sink -> GLboolean
unmarshalSink :: GLint -> Sink
instance Eq Sink
instance Ord Sink
instance Show Sink


-- | Object names are explicitly handled identifiers for API objects, e.g.
--   a texture object name in OpenGL or a buffer object name in OpenAL.
module Graphics.Rendering.OpenGL.GL.ObjectName

-- | An <a>ObjectName</a> is an explicitly handled identifier for API
--   objects, e.g. a texture object name in OpenGL or a buffer object name
--   in OpenAL.
class ObjectName a
genObjectNames :: ObjectName a => Int -> IO [a]
deleteObjectNames :: ObjectName a => [a] -> IO ()
isObjectName :: ObjectName a => a -> IO Bool


-- | This package contains tensor data types and their instances for some
--   basic type classes.
module Graphics.Rendering.OpenGL.GL.Tensor

-- | 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

-- | 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
instance Typeable1 Vertex1
instance Typeable1 Vertex2
instance Typeable1 Vertex3
instance Typeable1 Vertex4
instance Typeable1 Vector1
instance Typeable1 Vector2
instance Typeable1 Vector3
instance Typeable1 Vector4
instance Eq a => Eq (Vertex1 a)
instance Ord a => Ord (Vertex1 a)
instance Ix a => Ix (Vertex1 a)
instance Bounded a => Bounded (Vertex1 a)
instance Show a => Show (Vertex1 a)
instance Read a => Read (Vertex1 a)
instance Eq a => Eq (Vertex2 a)
instance Ord a => Ord (Vertex2 a)
instance Ix a => Ix (Vertex2 a)
instance Bounded a => Bounded (Vertex2 a)
instance Show a => Show (Vertex2 a)
instance Read a => Read (Vertex2 a)
instance Eq a => Eq (Vertex3 a)
instance Ord a => Ord (Vertex3 a)
instance Ix a => Ix (Vertex3 a)
instance Bounded a => Bounded (Vertex3 a)
instance Show a => Show (Vertex3 a)
instance Read a => Read (Vertex3 a)
instance Eq a => Eq (Vertex4 a)
instance Ord a => Ord (Vertex4 a)
instance Ix a => Ix (Vertex4 a)
instance Bounded a => Bounded (Vertex4 a)
instance Show a => Show (Vertex4 a)
instance Read a => Read (Vertex4 a)
instance Eq a => Eq (Vector1 a)
instance Ord a => Ord (Vector1 a)
instance Ix a => Ix (Vector1 a)
instance Bounded a => Bounded (Vector1 a)
instance Show a => Show (Vector1 a)
instance Read a => Read (Vector1 a)
instance Eq a => Eq (Vector2 a)
instance Ord a => Ord (Vector2 a)
instance Ix a => Ix (Vector2 a)
instance Bounded a => Bounded (Vector2 a)
instance Show a => Show (Vector2 a)
instance Read a => Read (Vector2 a)
instance Eq a => Eq (Vector3 a)
instance Ord a => Ord (Vector3 a)
instance Ix a => Ix (Vector3 a)
instance Bounded a => Bounded (Vector3 a)
instance Show a => Show (Vector3 a)
instance Read a => Read (Vector3 a)
instance Eq a => Eq (Vector4 a)
instance Ord a => Ord (Vector4 a)
instance Ix a => Ix (Vector4 a)
instance Bounded a => Bounded (Vector4 a)
instance Show a => Show (Vector4 a)
instance Read a => Read (Vector4 a)
instance Storable a => Storable (Vector4 a)
instance Typeable a => Typeable (Vector4 a)
instance Traversable Vector4
instance Foldable Vector4
instance Applicative Vector4
instance Functor Vector4
instance Storable a => Storable (Vector3 a)
instance Typeable a => Typeable (Vector3 a)
instance Traversable Vector3
instance Foldable Vector3
instance Applicative Vector3
instance Functor Vector3
instance Storable a => Storable (Vector2 a)
instance Typeable a => Typeable (Vector2 a)
instance Traversable Vector2
instance Foldable Vector2
instance Applicative Vector2
instance Functor Vector2
instance Storable a => Storable (Vector1 a)
instance Typeable a => Typeable (Vector1 a)
instance Traversable Vector1
instance Foldable Vector1
instance Applicative Vector1
instance Functor Vector1
instance Storable a => Storable (Vertex4 a)
instance Typeable a => Typeable (Vertex4 a)
instance Traversable Vertex4
instance Foldable Vertex4
instance Applicative Vertex4
instance Functor Vertex4
instance Storable a => Storable (Vertex3 a)
instance Typeable a => Typeable (Vertex3 a)
instance Traversable Vertex3
instance Foldable Vertex3
instance Applicative Vertex3
instance Functor Vertex3
instance Storable a => Storable (Vertex2 a)
instance Typeable a => Typeable (Vertex2 a)
instance Traversable Vertex2
instance Foldable Vertex2
instance Applicative Vertex2
instance Functor Vertex2
instance Storable a => Storable (Vertex1 a)
instance Typeable a => Typeable (Vertex1 a)
instance Traversable Vertex1
instance Foldable Vertex1
instance Applicative Vertex1
instance Functor Vertex1


-- | 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 GLdouble
instance Rect GLfloat
instance Rect GLint
instance Rect GLshort


-- | This is a purely internal module for (un-)marshaling PrimitiveMode.
module Graphics.Rendering.OpenGL.GL.PrimitiveMode

-- | 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
marshalPrimitiveMode :: PrimitiveMode -> GLenum
unmarshalPrimitiveMode :: GLenum -> PrimitiveMode
instance Eq PrimitiveMode
instance Ord PrimitiveMode
instance Show PrimitiveMode


-- | This is a purely internal module to compensate for differences between
--   Haskell implementations.
module Graphics.Rendering.OpenGL.GL.Exception

-- | When you want to acquire a resource, do some work with it, and then
--   release the resource, it is a good idea to use <a>bracket</a>, because
--   <a>bracket</a> will install the necessary exception handler to release
--   the resource in the event that an exception is raised during the
--   computation. If an exception is raised, then <a>bracket</a> will
--   re-raise the exception (after performing the release).
--   
--   A common example is opening a file:
--   
--   <pre>
--   bracket
--     (openFile "filename" ReadMode)
--     (hClose)
--     (\fileHandle -&gt; do { ... })
--   </pre>
--   
--   The arguments to <a>bracket</a> are in this order so that we can
--   partially apply it, e.g.:
--   
--   <pre>
--   withFile name mode = bracket (openFile name mode) hClose
--   </pre>
bracket :: IO a -> (a -> IO b) -> (a -> IO c) -> IO c

-- | A variant of <a>bracket</a> where the return value from the first
--   computation is not required.
bracket_ :: IO a -> IO b -> IO c -> IO c
unsafeBracket_ :: IO a -> IO b -> IO c -> IO c
finallyRet :: IO a -> IO b -> IO (a, b)


-- | 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 is a purely internal module for (un-)marshaling EdgeFlag.
module Graphics.Rendering.OpenGL.GL.EdgeFlag

-- | 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
marshalEdgeFlag :: EdgeFlag -> GLboolean
unmarshalEdgeFlag :: GLboolean -> EdgeFlag
instance Eq EdgeFlag
instance Ord EdgeFlag
instance Show EdgeFlag


-- | This is a purely internal module with utilities to query OpenGL state.
module Graphics.Rendering.OpenGL.GL.QueryUtils
lightIndexToEnum :: GLsizei -> Maybe GLenum
modelviewIndexToEnum :: GLsizei -> Maybe GLenum
modelviewEnumToIndex :: GLenum -> Maybe GLsizei
maybeNullPtr :: b -> (Ptr a -> b) -> Ptr a -> b


-- | This is a purely internal module for handling evaluator domains.
module Graphics.Rendering.OpenGL.GL.Domain
class Storable d => Domain d
glMap1 :: Domain d => GLenum -> d -> d -> GLint -> GLint -> Ptr d -> IO ()
glMap2 :: Domain d => GLenum -> d -> d -> GLint -> GLint -> d -> d -> GLint -> GLint -> Ptr d -> IO ()
glGetMapv :: Domain d => GLenum -> GLenum -> Ptr d -> IO ()
evalCoord1 :: Domain d => d -> IO ()
evalCoord1v :: Domain d => Ptr d -> IO ()
evalCoord2 :: Domain d => (d, d) -> IO ()
evalCoord2v :: Domain d => Ptr d -> IO ()
glMapGrid1 :: Domain d => GLint -> d -> d -> IO ()
glMapGrid2 :: Domain d => GLint -> d -> d -> GLint -> d -> d -> IO ()
get2 :: (Domain d, GetPName2F p) => (d -> d -> a) -> p -> IO a
get4 :: (Domain d, GetPName4F p) => (d -> d -> d -> d -> a) -> p -> IO a
instance Domain GLdouble
instance Domain GLfloat


-- | State variables are references in the IO monad, like <a>IORef</a>s or
--   parts of the OpenGL state. Note that state variables are not
--   neccessarily writable or readable, they may come in read-only or
--   write-only flavours, too. As a very simple example for a state
--   variable, consider an explicitly allocated memory buffer. This buffer
--   can easily be converted into a <a>StateVar</a>:
--   
--   <pre>
--   makeStateVarFromPtr :: Storable a =&gt; Ptr a -&gt; StateVar a
--   makeStateVarFromPtr p = makeStateVar (peek p) (poke p)
--   </pre>
--   
--   The example below puts 11 into a state variable (i.e. into the
--   buffer), increments the contents of the state variable by 22, and
--   finally prints the resulting content:
--   
--   <pre>
--   do p &lt;- malloc :: IO (Ptr Int)
--      let v = makeStateVarFromPtr p
--      v $= 11
--      v $~ (+ 22)
--      x &lt;- get v
--      print x
--   </pre>
--   
--   <a>IORef</a>s are state variables, too, so an example with them looks
--   extremely similiar:
--   
--   <pre>
--   do v &lt;- newIORef (0 :: Int)
--      v $= 11
--      v $~ (+ 22)
--      x &lt;- get v
--      print x
--   </pre>
module Graphics.Rendering.OpenGL.GL.StateVar

-- | The class of all readable state variables.
class HasGetter g
get :: HasGetter g => g a -> IO a

-- | A concrete implementation of a read-only state variable, carrying an
--   IO action to read the value.
data GettableStateVar a

-- | Construct a <a>GettableStateVar</a> from an IO action.
makeGettableStateVar :: IO a -> GettableStateVar a

-- | The class of all writable state variables.
class HasSetter s
($=) :: HasSetter s => s a -> a -> IO ()

-- | A concrete implementation of a write-only state variable, carrying an
--   IO action to write the new value.
data SettableStateVar a

-- | Construct a <a>SettableStateVar</a> from an IO action.
makeSettableStateVar :: (a -> IO ()) -> SettableStateVar a

-- | A concrete implementation of a readable and writable state variable,
--   carrying one IO action to read the value and another IO action to
--   write the new value.
data StateVar a

-- | Construct a <a>StateVar</a> from two IO actions, one for reading and
--   one for writing.
makeStateVar :: IO a -> (a -> IO ()) -> StateVar a

-- | A modificator convenience function, transforming the contents of a
--   state variable with a given funtion.
($~) :: (HasGetter v, HasSetter v) => v a -> (a -> a) -> IO ()

-- | A variant of <a>$=</a> which is strict in the value to be set.
($=!) :: HasSetter s => s a -> a -> IO ()

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


-- | This is a purely internal module for handling OpenGL capabilities,
--   i.e. boolean state variables.
module Graphics.Rendering.OpenGL.GL.Capability
data Capability
Disabled :: Capability
Enabled :: Capability
marshalCapability :: Capability -> GLboolean
unmarshalCapability :: GLboolean -> Capability
data EnableCap
CapFog :: EnableCap
CapLighting :: EnableCap
CapTexture1D :: EnableCap
CapTexture2D :: EnableCap
CapTextureRectangle :: EnableCap
CapLineStipple :: EnableCap
CapPolygonStipple :: EnableCap
CapCullFace :: EnableCap
CapAlphaTest :: EnableCap
CapBlend :: EnableCap
CapIndexLogicOp :: EnableCap
CapColorLogicOp :: EnableCap
CapDither :: EnableCap
CapStencilTest :: EnableCap
CapDepthTest :: EnableCap
CapClipPlane :: GLsizei -> EnableCap
CapLight :: GLsizei -> EnableCap
CapTextureGenS :: EnableCap
CapTextureGenT :: EnableCap
CapTextureGenR :: EnableCap
CapTextureGenQ :: EnableCap
CapMap1Vertex3 :: EnableCap
CapMap1Vertex4 :: EnableCap
CapMap1Color4 :: EnableCap
CapMap1Index :: EnableCap
CapMap1Normal :: EnableCap
CapMap1TextureCoord1 :: EnableCap
CapMap1TextureCoord2 :: EnableCap
CapMap1TextureCoord3 :: EnableCap
CapMap1TextureCoord4 :: EnableCap
CapMap2Vertex3 :: EnableCap
CapMap2Vertex4 :: EnableCap
CapMap2Color4 :: EnableCap
CapMap2Index :: EnableCap
CapMap2Normal :: EnableCap
CapMap2TextureCoord1 :: EnableCap
CapMap2TextureCoord2 :: EnableCap
CapMap2TextureCoord3 :: EnableCap
CapMap2TextureCoord4 :: EnableCap
CapPointSmooth :: EnableCap
CapLineSmooth :: EnableCap
CapPolygonSmooth :: EnableCap
CapScissorTest :: EnableCap
CapColorMaterial :: EnableCap
CapNormalize :: EnableCap
CapAutoNormal :: EnableCap
CapPolygonOffsetPoint :: EnableCap
CapPolygonOffsetLine :: EnableCap
CapPolygonOffsetFill :: EnableCap
CapVertexArray :: EnableCap
CapNormalArray :: EnableCap
CapColorArray :: EnableCap
CapIndexArray :: EnableCap
CapTextureCoordArray :: EnableCap
CapEdgeFlagArray :: EnableCap
CapFogCoordArray :: EnableCap
CapSecondaryColorArray :: EnableCap
CapMatrixIndexArray :: EnableCap
CapConvolution1D :: EnableCap
CapConvolution2D :: EnableCap
CapSeparable2D :: EnableCap
CapHistogram :: EnableCap
CapMinmax :: EnableCap
CapRescaleNormal :: EnableCap
CapSharedTexturePalette :: EnableCap
CapTexture3D :: EnableCap
CapMultisample :: EnableCap
CapSampleAlphaToCoverage :: EnableCap
CapSampleAlphaToOne :: EnableCap
CapSampleCoverage :: EnableCap
CapColorTable :: EnableCap
CapPostConvolutionColorTable :: EnableCap
CapPostColorMatrixColorTable :: EnableCap
CapColorSum :: EnableCap
CapTextureCubeMap :: EnableCap
CapWeightSumUnity :: EnableCap
CapVertexBlend :: EnableCap
CapWeightArray :: EnableCap
CapMatrixPalette :: EnableCap
CapDepthClamp :: EnableCap
CapDepthBoundsTest :: EnableCap
CapPrimitiveRestart :: EnableCap
CapPointSprite :: EnableCap
CapStencilTestTwoSide :: EnableCap
CapRasterPositionUnclipped :: EnableCap
CapRasterizerDiscard :: EnableCap
CapTextureColorTable :: EnableCap
CapVertexProgramPointSize :: EnableCap
CapVertexProgramTwoSide :: EnableCap
makeCapability :: EnableCap -> StateVar Capability
makeStateVarMaybe :: IO EnableCap -> IO a -> (a -> IO ()) -> StateVar (Maybe a)
data IndexedEnableCap
BlendI :: IndexedEnableCap
makeIndexedCapability :: (a -> GLuint) -> IndexedEnableCap -> a -> StateVar 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.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
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 <a>matrix</a> 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 GLdouble
instance MatrixComponent GLfloat


-- | 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 GLubyte -> IO ()


-- | 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.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.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

-- | 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 GLdouble
instance VertexAttribComponent GLfloat
instance VertexAttribComponent GLuint
instance VertexAttribComponent GLint
instance VertexAttribComponent GLushort
instance VertexAttribComponent GLshort
instance VertexAttribComponent GLubyte
instance VertexAttribComponent GLbyte
instance IndexComponent a => Index (Index1 a)
instance IndexComponent GLubyte
instance IndexComponent GLdouble
instance IndexComponent GLfloat
instance IndexComponent GLint
instance IndexComponent GLshort
instance ColorComponent a => SecondaryColor (Color3 a)
instance ColorComponent a => Color (Color4 a)
instance ColorComponent a => Color (Color3 a)
instance ColorComponent GLuint
instance ColorComponent GLushort
instance ColorComponent GLubyte
instance ColorComponent GLdouble
instance ColorComponent GLfloat
instance ColorComponent GLint
instance ColorComponent GLshort
instance ColorComponent GLbyte
instance FogCoordComponent a => FogCoord (FogCoord1 a)
instance FogCoordComponent GLdouble
instance FogCoordComponent GLfloat
instance NormalComponent a => Normal (Normal3 a)
instance NormalComponent GLdouble
instance NormalComponent GLfloat
instance NormalComponent GLint
instance NormalComponent GLshort
instance NormalComponent GLbyte
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 GLdouble
instance TexCoordComponent GLfloat
instance TexCoordComponent GLint
instance TexCoordComponent GLshort
instance VertexComponent a => Vertex (Vertex4 a)
instance VertexComponent a => Vertex (Vertex3 a)
instance VertexComponent a => Vertex (Vertex2 a)
instance VertexComponent GLdouble
instance VertexComponent GLfloat
instance VertexComponent GLint
instance VertexComponent GLshort


-- | 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 Capability
Disabled :: Capability
Enabled :: Capability
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)
primitiveRestartIndexNV :: 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
newtype BufferObject
BufferObject :: GLuint -> BufferObject
data BufferTarget
ArrayBuffer :: BufferTarget
CopyReadBuffer :: BufferTarget
CopyWriteBuffer :: BufferTarget
ElementArrayBuffer :: BufferTarget
PixelPackBuffer :: BufferTarget
PixelUnpackBuffer :: BufferTarget
TransformFeedbackBuffer :: 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
data BufferRangeAccessBit
ReadBit :: BufferRangeAccessBit
WriteBit :: BufferRangeAccessBit
InvalidateRangeBit :: BufferRangeAccessBit
InvalidateBufferBit :: BufferRangeAccessBit
FlushExplicitBit :: BufferRangeAccessBit
UnsychronizedBit :: BufferRangeAccessBit
type Offset = GLintptr
type Length = GLsizeiptr
mapBufferRange :: BufferTarget -> Offset -> Length -> [BufferRangeAccessBit] -> IO (Maybe (Ptr a))
flushMappedBufferRange :: BufferTarget -> Offset -> Length -> IO ()
type BufferIndex = GLuint
type RangeStartIndex = GLintptr
type RangeSize = GLsizeiptr
type BufferRange = (BufferObject, RangeStartIndex, RangeSize)
data IndexedBufferTarget
IndexedTransformFeedBackbuffer :: IndexedBufferTarget
bindBufferBase :: IndexedBufferTarget -> BufferIndex -> StateVar (Maybe BufferObject)
bindBufferRange :: IndexedBufferTarget -> BufferIndex -> StateVar (Maybe BufferRange)
indexedBufferStart :: IndexedBufferTarget -> BufferIndex -> GettableStateVar RangeStartIndex
indexedBufferSize :: IndexedBufferTarget -> BufferIndex -> GettableStateVar RangeSize
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 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
data ClampTarget
ClampVertexColor :: ClampTarget
ClampFragmentColor :: ClampTarget
ClampReadColor :: ClampTarget
data ClampMode
ClampOn :: ClampMode
FixedOnly :: ClampMode
ClampOff :: ClampMode
clampColor :: ClampTarget -> StateVar ClampMode
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 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


-- | This is a purely internal module for handling control points.
module Graphics.Rendering.OpenGL.GL.ControlPoint
class ControlPoint c
map1Target :: (ControlPoint c, Domain d) => c d -> GLenum
map2Target :: (ControlPoint c, Domain d) => c d -> GLenum
enableCap1 :: (ControlPoint c, Domain d) => c d -> EnableCap
enableCap2 :: (ControlPoint c, Domain d) => c d -> EnableCap
numComponents :: (ControlPoint c, Domain d) => c d -> Stride
peekControlPoint :: (ControlPoint c, Domain d) => Ptr (c d) -> IO (c d)
pokeControlPoint :: (ControlPoint c, Domain d) => Ptr (c d) -> (c d) -> IO ()
instance ControlPoint TexCoord4
instance ControlPoint TexCoord3
instance ControlPoint TexCoord2
instance ControlPoint TexCoord1
instance ControlPoint Normal3
instance ControlPoint Color4
instance ControlPoint Index1
instance ControlPoint Vertex4
instance ControlPoint Vertex3


-- | 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 :: (GLfloat, v) -> (GLfloat, v) -> (GLfloat, v) -> (GLfloat, 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 chapter 7 (NURBS) of the GLU specs.
module Graphics.Rendering.OpenGL.GLU.NURBS
type NURBSObj = Ptr GLUnurbs
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


-- | 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 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 <a>genObjectNames</a> instead </i>
genLists :: GLsizei -> IO [DisplayList]

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

-- | <i>Deprecated: use <a>isObjectName</a> 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 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 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 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 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 => Eq (MapDescriptor d)
instance Ord d => Ord (MapDescriptor d)
instance Show d => Show (MapDescriptor d)
instance Eq d => Eq (GLmap1 c d)
instance Ord d => Ord (GLmap1 c d)
instance Show d => Show (GLmap1 c d)
instance Eq d => Eq (GLmap2 c d)
instance Ord d => Ord (GLmap2 c d)
instance Show d => Show (GLmap2 c d)
instance Map2 GLmap2
instance Map1 GLmap1


-- | This is a purely internal module related to the current render mode.
module Graphics.Rendering.OpenGL.GL.RenderMode
data RenderMode
Render :: RenderMode
Feedback :: RenderMode
Select :: RenderMode
withRenderMode :: RenderMode -> IO a -> IO (a, GLint)
renderMode :: GettableStateVar RenderMode
instance Eq RenderMode
instance Ord RenderMode
instance Show RenderMode


-- | 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 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 GLclampf)
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)
type DrawBufferIndex = GLuint

-- | 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

-- | Only the given color attachment of the bound framebufferobject is
--   selected for reading or writing.
FBOColorAttachment :: 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]

-- | <a>drawBufferi</a> is a fast query function. For indices in the range
--   0..maxDrawBuffers it's results are the same as selection the index
--   from the list returned by drawBuffers. Though this function only uses
--   one gl-function call instead of maxDrawBuffers + 1.
drawBufferi :: DrawBufferIndex -> GettableStateVar 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 <a>Disabled</a>, 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)

-- | <a>colorMaski</a> is a version of <a>colorMask</a> that only applies
--   to the specified drawbuffer
colorMaski :: DrawBufferIndex -> 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 <a>Enabled</a>.
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


module Graphics.Rendering.OpenGL.GL.FramebufferObjects.FramebufferObjects
data FramebufferObject
FramebufferObject :: GLuint -> FramebufferObject
defaultFramebufferObject :: FramebufferObject
data FramebufferTarget
DrawFramebuffer :: FramebufferTarget
ReadFramebuffer :: FramebufferTarget
Framebuffer :: FramebufferTarget
marshalFramebufferTarget :: FramebufferTarget -> GLenum
bindFramebuffer :: FramebufferTarget -> StateVar FramebufferObject
data FramebufferStatus
Complete :: FramebufferStatus
Undefined :: FramebufferStatus
IncompleteMissingAttachment :: FramebufferStatus
IncompleteDrawBuffer :: FramebufferStatus
IncompleteReadBuffer :: FramebufferStatus
IncompleteMultiSample :: FramebufferStatus
Unsupported :: FramebufferStatus
framebufferStatus :: FramebufferTarget -> GettableStateVar FramebufferStatus
instance ObjectName FramebufferObject


module Graphics.Rendering.OpenGL.GL.FramebufferObjects.RenderbufferObjects
data RenderbufferObject
RenderbufferObject :: GLuint -> RenderbufferObject
noRenderbufferObject :: RenderbufferObject
data RenderbufferTarget
Renderbuffer :: RenderbufferTarget
marshalRenderbufferTarget :: RenderbufferTarget -> GLenum
data RenderbufferSize
RenderbufferSize :: !GLsizei -> !GLsizei -> RenderbufferSize
newtype Samples
Samples :: GLsizei -> Samples
bindRenderbuffer :: RenderbufferTarget -> StateVar RenderbufferObject
renderbufferStorage :: RenderbufferTarget -> PixelInternalFormat -> RenderbufferSize -> IO ()
renderbufferStorageMultiSample :: RenderbufferTarget -> Samples -> PixelInternalFormat -> RenderbufferSize -> IO ()
getRBParameteriv :: RenderbufferTarget -> (GLint -> a) -> GLenum -> IO a
instance ObjectName RenderbufferObject


-- | 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


module Graphics.Rendering.OpenGL.GL.VertexArrayObjects
data VertexArrayObject
bindVertexArrayObject :: StateVar (Maybe VertexArrayObject)
instance Eq VertexArrayObject
instance Ord VertexArrayObject
instance Show VertexArrayObject
instance ObjectName VertexArrayObject


-- | 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 GLdouble
instance WindowPosComponent GLfloat
instance WindowPosComponent GLint
instance WindowPosComponent GLshort
instance RasterPosComponent a => RasterPos (Vertex4 a)
instance RasterPosComponent a => RasterPos (Vertex3 a)
instance RasterPosComponent a => RasterPos (Vertex2 a)
instance RasterPosComponent GLdouble
instance RasterPosComponent GLfloat
instance RasterPosComponent GLint
instance RasterPosComponent GLshort


-- | 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 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 parts of section 6.1.5 (String Queries) of
--   the OpenGL 3.2 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)
contextProfile :: GettableStateVar [ContextProfile']
instance Eq ContextProfile'
instance Ord ContextProfile'
instance Show ContextProfile'


module Graphics.Rendering.OpenGL.GL.QueryObjects
data QueryObject
data QueryTarget
SamplesPassed :: QueryTarget
TransformFeedbackPrimitivesWritten :: QueryTarget
PrimitivesGenerated :: QueryTarget
marshalQueryTarget :: QueryTarget -> GLenum
beginQuery :: QueryTarget -> QueryObject -> IO ()
endQuery :: QueryTarget -> IO ()

-- | Convenience function for an exception-safe combination of
--   <a>beginQuery</a> and <a>endQuery</a>.
withQuery :: QueryTarget -> QueryObject -> IO a -> IO a
queryCounterBits :: QueryTarget -> GettableStateVar GLsizei
currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject)
queryResult :: QueryObject -> GettableStateVar GLuint
queryResultAvailable :: QueryObject -> GettableStateVar Bool
data ConditionalRenderMode
QueryWait :: ConditionalRenderMode
QueryNoWait :: ConditionalRenderMode
QueryByRegionWait :: ConditionalRenderMode
QueryByRegionNoWait :: ConditionalRenderMode
beginConditionalRender :: QueryObject -> ConditionalRenderMode -> IO ()
endConditionalRender :: IO ()
withConditionalRender :: QueryObject -> ConditionalRenderMode -> IO a -> IO a
instance Eq QueryObject
instance Ord QueryObject
instance Show QueryObject
instance Eq QueryTarget
instance Ord QueryTarget
instance Show QueryTarget
instance ObjectName QueryObject


-- | 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)
blend :: StateVar Capability

-- | enable or disable blending based on the buffer bound to the
--   <i>i</i>'th drawBuffer that is the buffer fmap (!! i) (get
--   drawBuffers)
blendBuffer :: DrawBufferIndex -> 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 BlendEquation
instance Ord BlendEquation
instance Show BlendEquation
instance Eq LogicOp
instance Ord LogicOp
instance Show LogicOp


-- | 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
R8 :: PixelInternalFormat
R16 :: PixelInternalFormat
RG8 :: PixelInternalFormat
RG16 :: 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
R16F :: PixelInternalFormat
RG16F :: PixelInternalFormat
RGB16F :: PixelInternalFormat
RGBA16F :: PixelInternalFormat
R32F :: PixelInternalFormat
RG32F :: PixelInternalFormat
RGB32F :: PixelInternalFormat
RGBA32F :: PixelInternalFormat
R8I :: PixelInternalFormat
R8UI :: PixelInternalFormat
R16I :: PixelInternalFormat
R16UI :: PixelInternalFormat
R32I :: PixelInternalFormat
R32UI :: PixelInternalFormat
RG8I :: PixelInternalFormat
RG8UI :: PixelInternalFormat
RG16I :: PixelInternalFormat
RG16UI :: PixelInternalFormat
RG32I :: PixelInternalFormat
RG32UI :: PixelInternalFormat
RGB8I :: PixelInternalFormat
RGB8UI :: PixelInternalFormat
RGB16I :: PixelInternalFormat
RGB16UI :: PixelInternalFormat
RGB32I :: PixelInternalFormat
RGB32UI :: PixelInternalFormat
RGBA8I :: PixelInternalFormat
RGBA8UI :: PixelInternalFormat
RGBA16I :: PixelInternalFormat
RGBA16UI :: PixelInternalFormat
RGBA32I :: PixelInternalFormat
RGBA32UI :: PixelInternalFormat
SLuminance8 :: PixelInternalFormat
SLuminance8Alpha8 :: PixelInternalFormat
CompressedAlpha :: PixelInternalFormat
CompressedLuminance :: PixelInternalFormat
CompressedLuminanceAlpha :: PixelInternalFormat
CompressedIntensity :: PixelInternalFormat
CompressedRed :: PixelInternalFormat
CompressedRG :: PixelInternalFormat
CompressedRGB :: PixelInternalFormat
CompressedRGBA :: PixelInternalFormat
CompressedSRGB :: PixelInternalFormat
CompressedSRGBAlpha :: PixelInternalFormat
CompressedSLuminance :: PixelInternalFormat
CompressedSLuminanceAlpha :: PixelInternalFormat
CompressedRedRGTC1 :: PixelInternalFormat
CompressedSignedRedRGTC1 :: PixelInternalFormat
CompressedRG_RGTC2 :: PixelInternalFormat
CompressedSignedRG_RGTC2 :: PixelInternalFormat
DepthComponent32f :: PixelInternalFormat
Depth32fStencil8 :: PixelInternalFormat
RGB9E5 :: PixelInternalFormat
R11fG11fB10f :: PixelInternalFormat
StencilIndex1 :: PixelInternalFormat
StencilIndex4 :: PixelInternalFormat
StencilIndex8 :: PixelInternalFormat
StencilIndex16 :: 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 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.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.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 GLfloat
instance PixelMapComponent GLuint
instance PixelMapComponent GLushort


-- | 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 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
DepthStencil :: PixelFormat
Red :: PixelFormat
Green :: PixelFormat
Blue :: PixelFormat
Alpha :: PixelFormat
RG :: PixelFormat
RGB :: PixelFormat
RGBA :: PixelFormat
Luminance :: PixelFormat
LuminanceAlpha :: PixelFormat
RedInteger :: PixelFormat
GreenInteger :: PixelFormat
BlueInteger :: PixelFormat
AlphaInteger :: PixelFormat
RGInteger :: PixelFormat
RGBInteger :: PixelFormat
RGBAInteger :: PixelFormat
BGRInteger :: PixelFormat
BGRAInteger :: PixelFormat
ABGR :: PixelFormat
BGR :: PixelFormat
BGRA :: PixelFormat
CMYK :: PixelFormat
CMYKA :: PixelFormat
FourTwoTwo :: PixelFormat
FourTwoTwoRev :: PixelFormat
FourTwoTwoAverage :: PixelFormat
FourTwoTwoRevAverage :: PixelFormat
YCBCR422 :: PixelFormat
drawPixels :: Size -> PixelData a -> IO ()
pixelZoom :: StateVar (GLfloat, GLfloat)


-- | 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 is a purely internal module for marshaling texture targets.
module Graphics.Rendering.OpenGL.GL.Texturing.TextureTarget
data TextureTarget
Texture1D :: TextureTarget
Texture2D :: TextureTarget
Texture3D :: TextureTarget
TextureCubeMap :: TextureTarget
TextureRectangle :: TextureTarget
marshalTextureTarget :: TextureTarget -> GLenum
marshalProxyTextureTarget :: Proxy -> TextureTarget -> GLenum
data CubeMapTarget
TextureCubeMapPositiveX :: CubeMapTarget
TextureCubeMapNegativeX :: CubeMapTarget
TextureCubeMapPositiveY :: CubeMapTarget
TextureCubeMapNegativeY :: CubeMapTarget
TextureCubeMapPositiveZ :: CubeMapTarget
TextureCubeMapNegativeZ :: CubeMapTarget
marshalCubeMapTarget :: CubeMapTarget -> GLenum
unmarshalCubeMapTarget :: GLenum -> CubeMapTarget
instance Eq TextureTarget
instance Ord TextureTarget
instance Show TextureTarget
instance Eq CubeMapTarget
instance Ord CubeMapTarget
instance Show CubeMapTarget


-- | 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 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 ()


module Graphics.Rendering.OpenGL.GL.Shaders.Limits

-- | 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


-- | 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 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 is a purely internal module for getting/setting texture
--   parameters.
module Graphics.Rendering.OpenGL.GL.Texturing.TexParameter
data TexParameter
TextureMinFilter :: TexParameter
TextureMagFilter :: TexParameter
TextureWrapS :: TexParameter
TextureWrapT :: TexParameter
TextureWrapR :: TexParameter
TextureBorderColor :: TexParameter
TextureMinLOD :: TexParameter
TextureMaxLOD :: TexParameter
TextureBaseLevel :: TexParameter
TextureMaxLevel :: TexParameter
TexturePriority :: TexParameter
TextureMaxAnisotropy :: TexParameter
TextureCompare :: TexParameter
TextureCompareOperator :: TexParameter
TextureCompareFailValue :: TexParameter
GenerateMipmap :: TexParameter
TextureCompareMode :: TexParameter
TextureCompareFunc :: TexParameter
DepthTextureMode :: TexParameter
TextureLODBias :: TexParameter
TextureResident :: TexParameter
texParami :: (GLint -> a) -> (a -> GLint) -> TexParameter -> TextureTarget -> StateVar a
texParamf :: (GLfloat -> a) -> (a -> GLfloat) -> TexParameter -> TextureTarget -> StateVar a
texParamC4f :: TexParameter -> TextureTarget -> StateVar (Color4 GLfloat)
getTexParameteri :: (GLint -> a) -> TextureTarget -> TexParameter -> IO a
combineTexParams :: (TextureTarget -> StateVar a) -> (TextureTarget -> StateVar b) -> (TextureTarget -> StateVar (a, b))
combineTexParamsMaybe :: (TextureTarget -> StateVar Capability) -> (TextureTarget -> StateVar a) -> (TextureTarget -> StateVar (Maybe a))


-- | 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 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 ()
data BlitFramebufferMask
BlitColorBuffer :: BlitFramebufferMask
BlitStencilBuffer :: BlitFramebufferMask
BlitDepthBuffer :: BlitFramebufferMask
blitFramebuffer :: Position -> Position -> Position -> Position -> [BlitFramebufferMask] -> TextureFilter -> IO ()
instance Eq PixelCopyType
instance Ord PixelCopyType
instance Show PixelCopyType


-- | 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.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 section 3.8 (Texturing) of the OpenGL 2.1
--   specs.
module Graphics.Rendering.OpenGL.GL.Texturing


module Graphics.Rendering.OpenGL.GL.FramebufferObjects.Attachments
data FramebufferObjectAttachment
ColorAttachment :: !GLuint -> FramebufferObjectAttachment
DepthAttachment :: FramebufferObjectAttachment
StencilAttachment :: FramebufferObjectAttachment
DepthStencilAttachment :: FramebufferObjectAttachment
fboaToBufferMode :: FramebufferObjectAttachment -> Maybe BufferMode
fboaFromBufferMode :: BufferMode -> Maybe FramebufferObjectAttachment
maxColorAttachments :: GLenum
class Show a => FramebufferAttachment a
marshalAttachment :: FramebufferAttachment a => a -> Maybe GLenum
unmarshalAttachment :: FramebufferAttachment a => GLenum -> a
unmarshalAttachmentSafe :: FramebufferAttachment a => GLenum -> Maybe a
framebufferRenderbuffer :: FramebufferTarget -> FramebufferObjectAttachment -> RenderbufferTarget -> RenderbufferObject -> IO ()
framebufferTexture1D :: FramebufferTarget -> FramebufferObjectAttachment -> TextureObject -> Level -> IO ()
framebufferTexture2D :: FramebufferTarget -> FramebufferObjectAttachment -> Maybe CubeMapTarget -> TextureObject -> Level -> IO ()
framebufferTexture3D :: FramebufferTarget -> FramebufferObjectAttachment -> TextureObject -> Level -> GLint -> IO ()
framebufferTextureLayer :: FramebufferTarget -> FramebufferObjectAttachment -> TextureObject -> Level -> GLint -> IO ()
getFBAParameteriv :: FramebufferAttachment fba => FramebufferTarget -> fba -> (GLint -> a) -> GLenum -> IO a
instance Eq FramebufferObjectAttachment
instance Show FramebufferObjectAttachment
instance FramebufferAttachment BufferMode
instance FramebufferAttachment FramebufferObjectAttachment


module Graphics.Rendering.OpenGL.GL.PixellikeObject
data PixellikeObjectGetPName
RedSize :: PixellikeObjectGetPName
BlueSize :: PixellikeObjectGetPName
GreenSize :: PixellikeObjectGetPName
AlphaSize :: PixellikeObjectGetPName
DepthSize :: PixellikeObjectGetPName
StencilSize :: PixellikeObjectGetPName
class PixellikeObjectTarget t where pixellikeObjTarParam t p = makeGettableStateVar (pixObjTarQueryFunc t $ marshalPixellikeOT t p)
pixellikeObjTarParam :: PixellikeObjectTarget t => t -> PixellikeObjectGetPName -> GettableStateVar GLint
instance PixellikeObjectTarget TextureTargetFull
instance PixellikeObjectTarget FramebufferTargetAttachment
instance PixellikeObjectTarget RenderbufferTarget


module Graphics.Rendering.OpenGL.GL.FramebufferObjects.Queries
data AttachmentObjectType
DefaultFramebufferAttachment :: AttachmentObjectType
TextureAttachment :: AttachmentObjectType
RenderbufferAttachment :: AttachmentObjectType
attachmentObjectType :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar (Maybe AttachmentObjectType)

-- | tries to retrieve the object that is bound to the attachment point of
--   the given framebuffertarget. If the object type of it is None or the
--   default, then <a>Nothing</a> is returned, otherwise the bound
--   <a>RenderbufferObject</a> or <a>TextureObject</a>
attachmentObject :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar (Maybe (Either RenderbufferObject TextureObject))
attachmentTextureLayer :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
attachmentTextureLevel :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar Level
attachmentTextureCubeMapTarget :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar CubeMapTarget
attachmentRedSize :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
attachmentBlueSize :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
attachmentGreenSize :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
attachmentAlphaSize :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
attachmentDepthSize :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
attachmentStencilSize :: FramebufferAttachment fba => FramebufferTarget -> fba -> GettableStateVar GLint
renderbufferWidth :: RenderbufferTarget -> GettableStateVar GLsizei
renderbufferHeight :: RenderbufferTarget -> GettableStateVar GLsizei
renderbufferInternalFormat :: RenderbufferTarget -> GettableStateVar PixelInternalFormat
renderbufferSamples :: RenderbufferTarget -> GettableStateVar Samples
renderbufferRedSize :: RenderbufferTarget -> GettableStateVar GLint
renderbufferBlueSize :: RenderbufferTarget -> GettableStateVar GLint
renderbufferGreenSize :: RenderbufferTarget -> GettableStateVar GLint
renderbufferAlphaSize :: RenderbufferTarget -> GettableStateVar GLint
renderbufferDepthSize :: RenderbufferTarget -> GettableStateVar GLint
renderbufferStencilSize :: RenderbufferTarget -> GettableStateVar GLint


module Graphics.Rendering.OpenGL.GL.FramebufferObjects


module Graphics.Rendering.OpenGL.GL.GLstring
peekGLstringLen :: GLStringLen -> IO String
withGLStringLen :: String -> (GLStringLen -> IO a) -> IO a
withGLString :: String -> (Ptr GLchar -> IO a) -> IO a
stringQuery :: GettableStateVar GLsizei -> (GLsizei -> Ptr GLsizei -> Ptr GLchar -> IO ()) -> GettableStateVar String


-- | This module correspons with section 2.20.1 (Shader Objects) of the
--   OpenGL 3.1 spec.
module Graphics.Rendering.OpenGL.GL.Shaders.Shaders
class (Eq s, Ord s, Show s, ObjectName s) => Shader s
shaderID :: Shader s => s -> GLuint
makeShader :: Shader s => GLuint -> s
shaderType :: Shader s => s -> GLenum
newtype VertexShader
VertexShader :: GLuint -> VertexShader
vertexShaderID :: VertexShader -> GLuint
newtype FragmentShader
FragmentShader :: GLuint -> FragmentShader
fragmentShaderID :: FragmentShader -> GLuint
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
shaderTypeEnum :: Shader s => s -> GettableStateVar GLenum
instance Eq VertexShader
instance Ord VertexShader
instance Show VertexShader
instance Eq FragmentShader
instance Ord FragmentShader
instance Show FragmentShader
instance ObjectName FragmentShader
instance ObjectName VertexShader
instance Shader FragmentShader
instance Shader VertexShader


-- | This module correspons with section 2.20.2 (Program Objects) of the
--   OpenGL 3.1 spec.
module Graphics.Rendering.OpenGL.GL.Shaders.Program
newtype Program
Program :: GLuint -> Program
programID :: Program -> GLuint
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)

-- | <a>bindFragDataLocation</a> binds a varying variable, specified by
--   program and name, to a drawbuffer. The effects only take place after
--   succesfull linking of the program. invalid arguments and conditions
--   are - an index larger than maxDrawBufferIndex - names starting with
--   <tt>gl_</tt> linking failure will ocure when - one of the arguments
--   was invalid - more than one varying varuable name is bound to the same
--   index It's not an error to specify unused variables, those will be
--   ingored.
bindFragDataLocation :: Program -> String -> SettableStateVar DrawBufferIndex

-- | query the binding of a given variable, specified by program and name.
--   The program has to be linked. The result is Nothing if an error
--   occures or the name is not a name of a varying variable. If the
--   program hasn't been linked an <tt>InvalidOperation</tt> error is
--   generated.
getFragDataLocation :: Program -> String -> IO (Maybe DrawBufferIndex)
data GetProgramPName
ProgramDeleteStatus :: GetProgramPName
LinkStatus :: GetProgramPName
ValidateStatus :: GetProgramPName
ProgramInfoLogLength :: GetProgramPName
AttachedShaders :: GetProgramPName
ActiveAttributes :: GetProgramPName
ActiveAttributeMaxLength :: GetProgramPName
ActiveUniforms :: GetProgramPName
ActiveUniformMaxLength :: GetProgramPName
TransformFeedbackBufferMode :: GetProgramPName
TransformFeedbackVaryings :: GetProgramPName
TransformFeedbackVaryingMaxLength :: GetProgramPName
programVar :: (GLint -> a) -> GetProgramPName -> Program -> GettableStateVar a
getCurrentProgram :: IO Program
instance Eq Program
instance Ord Program
instance Show Program
instance ObjectName Program


module Graphics.Rendering.OpenGL.GL.TransformFeedback
beginTransformFeedback :: PrimitiveMode -> IO ()
endTransformFeedback :: IO ()
data TransformFeedbackBufferMode
InterleavedAttribs :: TransformFeedbackBufferMode
SeperateAttribs :: TransformFeedbackBufferMode
marshalTransformFeedbackBufferMode :: TransformFeedbackBufferMode -> GLenum
unmarshalTransformFeedbackBufferMode :: GLenum -> TransformFeedbackBufferMode

-- | Get the currently used transformFeedbackBufferMode
transformFeedbackBufferMode :: Program -> GettableStateVar TransformFeedbackBufferMode

-- | The number of varyings that are currently recorded when in transform
--   feedback mode
getTransformFeedbackVaryings :: Program -> GettableStateVar GLuint

-- | Set all the transform feedbacks varyings for this program it
--   overwrites any previous call to this function
setTransformFeedbackVaryings :: Program -> [String] -> TransformFeedbackBufferMode -> IO ()

-- | Get the name, datatype and size of a single transform feedback
--   varying.
getTransformFeedbackVarying :: Program -> VaryingIndex -> MaxLength -> IO (String, DataType, GLsizei)

-- | The maximum length of a varying's name for transform feedback mode
getTransformFeedbackVaryingMaxLength :: Program -> GettableStateVar GLuint

-- | Max number of seprate atributes or varyings than can be captured in
--   transformfeedback, initial value 4
maxTransformFeedbackSeparateAttribs :: GettableStateVar GLint

-- | Max number of components to write to a single buffer in interleaved
--   mod, initial value 64
maxTransformFeedbackInterleavedComponents :: GettableStateVar GLint

-- | Max number of components per attribute or varying in seperate mode
--   initial value 4
maxTransformFeedbackSeparateComponents :: GettableStateVar GLint


-- | This internal module contains the functions and datatypes used by the
--   Uniform and Attribs modules.
module Graphics.Rendering.OpenGL.GL.Shaders.Variables
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
activeVars :: (Program -> GettableStateVar GLuint) -> (Program -> GettableStateVar GLsizei) -> (GLuint -> GLuint -> GLsizei -> Ptr GLsizei -> Ptr GLint -> Ptr GLenum -> Ptr GLchar -> IO ()) -> Program -> GettableStateVar [(GLint, VariableType, String)]
instance Eq VariableType
instance Ord VariableType
instance Show VariableType


-- | This module contains functions related to shader attributes, this
--   corresponds to section 2.20.3 of the OpenGL 3.1 spec (Shader
--   Variables).
module Graphics.Rendering.OpenGL.GL.Shaders.Attribs
attribLocation :: Program -> String -> StateVar AttribLocation
activeAttribs :: Program -> GettableStateVar [(GLint, VariableType, String)]


-- | This module contains functions related to shader uniforms, this
--   corresponds to section 2.20.3 of the OpenGL 3.1 spec (Shader
--   Variables).
module Graphics.Rendering.OpenGL.GL.Shaders.Uniform
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
instance Eq UniformLocation
instance Ord UniformLocation
instance Show UniformLocation
instance Uniform TextureUnit
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 GLfloat
instance UniformComponent GLuint
instance UniformComponent GLint


-- | 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)

-- | <a>bindFragDataLocation</a> binds a varying variable, specified by
--   program and name, to a drawbuffer. The effects only take place after
--   succesfull linking of the program. invalid arguments and conditions
--   are - an index larger than maxDrawBufferIndex - names starting with
--   <tt>gl_</tt> linking failure will ocure when - one of the arguments
--   was invalid - more than one varying varuable name is bound to the same
--   index It's not an error to specify unused variables, those will be
--   ingored.
bindFragDataLocation :: Program -> String -> SettableStateVar DrawBufferIndex

-- | query the binding of a given variable, specified by program and name.
--   The program has to be linked. The result is Nothing if an error
--   occures or the name is not a name of a varying variable. If the
--   program hasn't been linked an <tt>InvalidOperation</tt> error is
--   generated.
getFragDataLocation :: Program -> String -> IO (Maybe DrawBufferIndex)
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


-- | 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 chapter 2 (Initialization) of the GLU
--   specs.
module Graphics.Rendering.OpenGL.GLU.Initialization
gluVersion :: GettableStateVar String
gluExtensions :: GettableStateVar [String]


-- | 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
