-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A context aware binding for the OpenGL graphics system -- -- A fork of the hOpenGL 2.2.1.1 package. Modifications to OpenGL IO -- using the -XGeneralizedNewtypeDeriving extension create context -- sensitive MonadIO aliases. @package OGL @version 0.0.2 -- | This module corresponds to section 2.3 (GL Command Sytax) of the -- OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.BasicTypes -- | Boolean (min. 1 bit) type GLboolean = Word8 -- | Signed 2's complement binary integer (min. 8 bits) type GLbyte = Int8 -- | Unsigned binary integer (min. 8 bits) type GLubyte = Word8 -- | Characters making up strings type GLchar = Int8 -- | Signed 2's complement binary integer (min. 16 bits) type GLshort = Int16 -- | Unsigned binary integer (min. 16 bits) type GLushort = Word16 -- | Signed 2's complement binary integer (min. 32 bits) type GLint = Int32 -- | Unsigned binary integer (min. 32 bits) type GLuint = Word32 -- | Non-negatitve binary integer size (min. 32 bits) type GLsizei = Int32 -- | Enumerated binary integer value (min. 32 bits) type GLenum = Word32 -- | Signed 2's complement binary integer (sufficiently large enough to -- hold any address) type GLintptr = Int32 -- | Non-negatitve binary integer size (sufficiently large enough to hold -- any address) type GLsizeiptr = Int32 -- | Bit field (min. 32 bits) type GLbitfield = Word32 -- | Floating-point value (min. 32 bits) type GLfloat = Float -- | Floating-point value clamped to [0,1] (min. 32 bits) type GLclampf = Float -- | Floating-point value (min. 64 bits) type GLdouble = Double -- | Floating-point value clamped to [0,1] (min. 64 bits) type GLclampd = Double data Capability Disabled :: Capability Enabled :: Capability instance Eq Capability instance Ord Capability instance Show Capability -- | GL Contexts: -- --
-- Graphics.Rendering.OGL.GL.BeginEnd.renderPrimitive Graphics.Rendering.OGL.GL.BeginEnd.Polygon $ do -- Graphics.Rendering.OGL.GL.VertexSpec.vertex (Vertex2 x1 y1) -- Graphics.Rendering.OGL.GL.VertexSpec.vertex (Vertex2 x2 y1) -- Graphics.Rendering.OGL.GL.VertexSpec.vertex (Vertex2 x2 y2) -- Graphics.Rendering.OGL.GL.VertexSpec.vertex (Vertex2 x1 y2) ---- -- 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 -> GL () rectv :: (Rect a) => Ptr a -> Ptr a -> GL () instance Rect Double instance Rect Float instance Rect Int32 instance Rect Int16 -- | This module corresponds to section 2.13 (Current Raster Position) of -- the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.RasterPos currentRasterPosition :: StateVar (Vertex4 GLfloat) class RasterPosComponent a class RasterPos a rasterPos :: (RasterPos a) => a -> GL () rasterPosv :: (RasterPos a) => Ptr a -> GL () class WindowPosComponent a class WindowPos a windowPos :: (WindowPos a) => a -> GL () windowPosv :: (WindowPos a) => Ptr a -> GL () currentRasterDistance :: GettableStateVar GLfloat currentRasterColor :: GettableStateVar (Color4 GLfloat) currentRasterSecondaryColor :: GettableStateVar (Color4 GLfloat) currentRasterIndex :: GettableStateVar (Index1 GLint) currentRasterTexCoords :: GettableStateVar (TexCoord4 GLfloat) currentRasterPositionValid :: GettableStateVar Bool rasterPositionUnclipped :: StateVar Capability instance (WindowPosComponent a) => WindowPos (Vertex3 a) instance (WindowPosComponent a) => WindowPos (Vertex2 a) instance WindowPosComponent Double instance WindowPosComponent Float instance WindowPosComponent Int32 instance WindowPosComponent Int16 instance (RasterPosComponent a) => RasterPos (Vertex4 a) instance (RasterPosComponent a) => RasterPos (Vertex3 a) instance (RasterPosComponent a) => RasterPos (Vertex2 a) instance RasterPosComponent Double instance RasterPosComponent Float instance RasterPosComponent Int32 instance RasterPosComponent Int16 -- | This module corresponds to sections 2.15 (Vertex Shaders) and section -- 3.11 (Fragment Shaders) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.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 -> GL () 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 -> GL () linkStatus :: Program -> GettableStateVar Bool programInfoLog :: Program -> GettableStateVar String validateProgram :: Program -> GL () validateStatus :: Program -> GettableStateVar Bool currentProgram :: StateVar (Maybe Program) attribLocation :: Program -> String -> StateVar AttribLocation data VariableType Float' :: VariableType FloatVec2 :: VariableType FloatVec3 :: VariableType FloatVec4 :: VariableType FloatMat2 :: VariableType FloatMat3 :: VariableType FloatMat4 :: VariableType Int' :: VariableType IntVec2 :: VariableType IntVec3 :: VariableType IntVec4 :: VariableType Bool :: VariableType BoolVec2 :: VariableType BoolVec3 :: VariableType BoolVec4 :: VariableType Sampler1D :: VariableType Sampler2D :: VariableType Sampler3D :: VariableType SamplerCube :: VariableType Sampler1DShadow :: VariableType Sampler2DShadow :: 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 -> GL () class (Storable a) => UniformComponent a -- | Contains the number of hardware units that can be used to access -- texture maps from the vertex processor. The minimum legal value is 0. maxVertexTextureImageUnits :: GettableStateVar GLsizei -- | Contains the total number of hardware units that can be used to access -- texture maps from the fragment processor. The minimum legal value is -- 2. maxTextureImageUnits :: GettableStateVar GLsizei -- | Contains the total number of hardware units that can be used to access -- texture maps from the vertex processor and the fragment processor -- combined. Note: If the vertex shader and the fragment processing stage -- access the same texture image unit, then that counts as using two -- texture image units. The minimum legal value is 2. maxCombinedTextureImageUnits :: GettableStateVar GLsizei -- | Contains the number of texture coordinate sets that are available. The -- minimum legal value is 2. maxTextureCoords :: GettableStateVar GLsizei -- | Contains the number of individual components (i.e., floating-point, -- integer or boolean values) that are available for vertex shader -- uniform variables. The minimum legal value is 512. maxVertexUniformComponents :: GettableStateVar GLsizei -- | Contains the number of individual components (i.e., floating-point, -- integer or boolean values) that are available for fragment shader -- uniform variables. The minimum legal value is 64. maxFragmentUniformComponents :: GettableStateVar GLsizei -- | Contains the number of active vertex attributes that are available. -- The minimum legal value is 16. maxVertexAttribs :: GettableStateVar GLsizei -- | Contains the number of individual floating-point values available for -- varying variables. The minimum legal value is 32. maxVaryingFloats :: GettableStateVar GLsizei instance Eq UniformLocation instance Ord UniformLocation instance Show UniformLocation instance Eq VariableType instance Ord VariableType instance Show VariableType instance Eq Program instance Ord Program instance Show Program instance Eq FragmentShader instance Ord FragmentShader instance Show FragmentShader instance Eq VertexShader instance Ord VertexShader instance Show VertexShader instance (UniformComponent a) => Uniform (Index1 a) instance (UniformComponent a) => Uniform (Color4 a) instance (UniformComponent a) => Uniform (Color3 a) instance (UniformComponent a) => Uniform (FogCoord1 a) instance (UniformComponent a) => Uniform (Normal3 a) instance (UniformComponent a) => Uniform (TexCoord4 a) instance (UniformComponent a) => Uniform (TexCoord3 a) instance (UniformComponent a) => Uniform (TexCoord2 a) instance (UniformComponent a) => Uniform (TexCoord1 a) instance (UniformComponent a) => Uniform (Vertex4 a) instance (UniformComponent a) => Uniform (Vertex3 a) instance (UniformComponent a) => Uniform (Vertex2 a) instance UniformComponent Float instance UniformComponent Int32 instance ObjectName Program instance ObjectName FragmentShader instance ObjectName VertexShader instance Shader FragmentShader instance Shader VertexShader -- | This module corresponds to section 3.4 (Line Segments) of the OpenGL -- 2.1 specs. module Graphics.Rendering.OGL.GL.LineSegments -- | lineWidth 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 lineSmooth). 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 -- delta x >= delta y, i pixels are filled in -- each column that is rasterized, where i is the rounded value of -- lineWidth. Otherwise, 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 -- smoothLineWidthRange and smoothLineWidthGranularity, -- respectively. For aliased lines, query the supported range with -- aliasedLineWidthRange. -- -- The line width specified when lineWidth 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 aliasedLineWidthRange -- to determine the maximum width. -- -- An Graphics.Rendering.OGL.GLU.Errors.InvalidValue is -- generated if lineWidth is set to a value less than or equal to -- zero. -- -- An Graphics.Rendering.OGL.GLU.Errors.InvalidOperation is -- generated if lineWidth is set during -- Graphics.Rendering.OGL.GL.BeginEnd.renderPrimitive. 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 -- lineStipple pair, clamped to the range [ 1 .. 256 ]), the -- 16-bit line stipple pattern (2nd element), and an integer stipple -- counter s. -- -- The counter s is reset to 0 at before the first action during -- Graphics.Rendering.OGL.GL.BeginEnd.renderPrimitive is called -- and before each line segment during -- Graphics.Rendering.OGL.GL.BeginEnd.renderPrimitive is -- generated. It is incremented after each fragment of a unit width -- aliased line segment is generated or after each i fragments of -- an i width line segment are generated. The i fragments -- associated with count s are masked out if -- Data.Bits.testBit pattern (( s / -- factor ) mod 16) is False, 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 s is rasterized or -- not depends on the fragment rule described for aliased lines, counting -- rectangles rather than groups of fragments. -- -- The initial value of lineStipple is Nothing, i.e. line -- stippling is disabled. -- -- An Graphics.Rendering.OGL.GLU.Errors.InvalidOperation is -- generated if lineStipple is set during -- Graphics.Rendering.OGL.GL.BeginEnd.renderPrimitive. lineStipple :: StateVar (Maybe (GLint, GLushort)) -- | Controls whether line antialiasing is enabled. The initial state is -- Graphics.Rendering.OGL.GL.BasicTypes.Disabled. 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 parts of section 6.1.11 (Pointer and String -- Queries) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.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. glVersion or -- shadingLanguageVersion, transforming a variable containing a -- string of the form major.minor[optional rest] 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 (-1,-1). majorMinor :: GettableStateVar String -> GettableStateVar (Int, Int) -- | This module corresponds to section 6.1.14 (Saving and Restoring State) -- of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.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] -> GL a -> GL a data ClientAttributeGroup PixelStoreAttributes :: ClientAttributeGroup VertexArrayAttributes :: ClientAttributeGroup AllClientAttributes :: ClientAttributeGroup preservingClientAttrib :: [ClientAttributeGroup] -> GL a -> GL a instance Eq ClientAttributeGroup instance Ord ClientAttributeGroup instance Show ClientAttributeGroup instance Eq ServerAttributeGroup instance Ord ServerAttributeGroup instance Show ServerAttributeGroup -- | This module corresponds to section 4.1 (Per-Fragment Operations) of -- the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.PerFragment scissor :: StateVar (Maybe (Position, Size)) sampleAlphaToCoverage :: StateVar Capability sampleAlphaToOne :: StateVar Capability sampleCoverage :: StateVar (Maybe (GLclampf, Bool)) depthBounds :: StateVar (Maybe (GLclampd, GLclampd)) data ComparisonFunction Never :: ComparisonFunction Less :: ComparisonFunction Equal :: ComparisonFunction Lequal :: ComparisonFunction Greater :: ComparisonFunction Notequal :: ComparisonFunction Gequal :: ComparisonFunction Always :: ComparisonFunction alphaFunc :: StateVar (Maybe (ComparisonFunction, GLclampf)) stencilTest :: StateVar Capability stencilFunc :: StateVar (ComparisonFunction, GLint, GLuint) stencilFuncSeparate :: Face -> SettableStateVar (ComparisonFunction, GLint, GLuint) data StencilOp OpZero :: StencilOp OpKeep :: StencilOp OpReplace :: StencilOp OpIncr :: StencilOp OpIncrWrap :: StencilOp OpDecr :: StencilOp OpDecrWrap :: StencilOp OpInvert :: StencilOp stencilOp :: StateVar (StencilOp, StencilOp, StencilOp) stencilOpSeparate :: Face -> SettableStateVar (StencilOp, StencilOp, StencilOp) activeStencilFace :: StateVar (Maybe Face) depthFunc :: StateVar (Maybe ComparisonFunction) newtype QueryObject QueryObject :: GLuint -> QueryObject data QueryTarget SamplesPassed :: QueryTarget withQuery :: QueryTarget -> QueryObject -> GL a -> GL a queryCounterBits :: QueryTarget -> GettableStateVar GLsizei currentQuery :: QueryTarget -> GettableStateVar (Maybe QueryObject) queryResult :: QueryObject -> GettableStateVar GLuint queryResultAvailable :: QueryObject -> GettableStateVar Bool blend :: StateVar Capability data BlendEquation FuncAdd :: BlendEquation FuncSubtract :: BlendEquation FuncReverseSubtract :: BlendEquation Min :: BlendEquation Max :: BlendEquation LogicOp :: BlendEquation blendEquation :: StateVar BlendEquation blendEquationSeparate :: StateVar (BlendEquation, BlendEquation) data BlendingFactor Zero :: BlendingFactor One :: BlendingFactor SrcColor :: BlendingFactor OneMinusSrcColor :: BlendingFactor DstColor :: BlendingFactor OneMinusDstColor :: BlendingFactor SrcAlpha :: BlendingFactor OneMinusSrcAlpha :: BlendingFactor DstAlpha :: BlendingFactor OneMinusDstAlpha :: BlendingFactor ConstantColor :: BlendingFactor OneMinusConstantColor :: BlendingFactor ConstantAlpha :: BlendingFactor OneMinusConstantAlpha :: BlendingFactor SrcAlphaSaturate :: BlendingFactor blendFuncSeparate :: StateVar ((BlendingFactor, BlendingFactor), (BlendingFactor, BlendingFactor)) blendFunc :: StateVar (BlendingFactor, BlendingFactor) blendColor :: StateVar (Color4 GLclampf) dither :: StateVar Capability data LogicOp Clear :: LogicOp And :: LogicOp AndReverse :: LogicOp Copy :: LogicOp AndInverted :: LogicOp Noop :: LogicOp Xor :: LogicOp Or :: LogicOp Nor :: LogicOp Equiv :: LogicOp Invert :: LogicOp OrReverse :: LogicOp CopyInverted :: LogicOp OrInverted :: LogicOp Nand :: LogicOp Set :: LogicOp logicOp :: StateVar (Maybe LogicOp) instance Eq LogicOp instance Ord LogicOp instance Show LogicOp instance Eq BlendEquation instance Ord BlendEquation instance Show BlendEquation instance Eq QueryTarget instance Ord QueryTarget instance Show QueryTarget instance Eq QueryObject instance Ord QueryObject instance Show QueryObject instance Eq StencilOp instance Ord StencilOp instance Show StencilOp instance ObjectName QueryObject -- | This module corresponds to section 3.6.1 (Pixel Storage Modes) of the -- OpenGL 2.1 specs. module Graphics.Rendering.OGL.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.OGL.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.OGL.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 withNewPixelMap :: (PixelMap m, PixelMapComponent c) => Int -> (Ptr c -> GL ()) -> GL (m c) withPixelMap :: (PixelMap m, PixelMapComponent c) => m c -> (Int -> Ptr c -> GL a) -> GL a newPixelMap :: (PixelMap m, PixelMapComponent c) => [c] -> GL (m c) getPixelMapComponents :: (PixelMap m, PixelMapComponent c) => m c -> GL [c] data GLpixelmap a maxPixelMapTable :: GettableStateVar GLsizei pixelMap :: (PixelMap m, PixelMapComponent c) => PixelMapTarget -> StateVar (m c) -- | Convenience state variable pixelMapIToRGBA :: (PixelMapComponent c) => StateVar [Color4 c] -- | Convenience state variable pixelMapRGBAToRGBA :: (PixelMapComponent c) => StateVar [Color4 c] instance Eq (GLpixelmap a) instance Ord (GLpixelmap a) instance Show (GLpixelmap a) instance PixelMap GLpixelmap instance PixelMapComponent Float instance PixelMapComponent Word32 instance PixelMapComponent Word16 -- | This module corresponds to a part of section 3.6.4 (Rasterization of -- Pixel Rectangles) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.PixelRectangles.Rasterization data PixelData a PixelData :: PixelFormat -> DataType -> (Ptr a) -> PixelData a data PixelFormat ColorIndex :: PixelFormat StencilIndex :: PixelFormat DepthComponent :: PixelFormat Red :: PixelFormat Green :: PixelFormat Blue :: PixelFormat Alpha :: PixelFormat RGB :: PixelFormat RGBA :: PixelFormat Luminance :: PixelFormat LuminanceAlpha :: PixelFormat ABGR :: PixelFormat BGR :: PixelFormat BGRA :: PixelFormat CMYK :: PixelFormat CMYKA :: PixelFormat FourTwoTwo :: PixelFormat FourTwoTwoRev :: PixelFormat FourTwoTwoAverage :: PixelFormat FourTwoTwoRevAverage :: PixelFormat YCBCR422 :: PixelFormat DepthStencil :: PixelFormat drawPixels :: Size -> PixelData a -> GL () pixelZoom :: StateVar (GLfloat, GLfloat) -- | This module corresponds to a part of section 3.6.1 (Pixel Storage -- Modes) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.PixelRectangles.ColorTable data ColorTableStage ColorTableStage :: ColorTableStage PostConvolutionColorTableStage :: ColorTableStage PostColorMatrixColorTableStage :: ColorTableStage TextureColorTableStage :: ColorTableStage colorTableStage :: ColorTableStage -> StateVar Capability data Proxy NoProxy :: Proxy Proxy :: Proxy data ColorTable ColorTable :: ColorTable PostConvolutionColorTable :: ColorTable PostColorMatrixColorTable :: ColorTable Texture1DColorTable :: ColorTable Texture2DColorTable :: ColorTable Texture3DColorTable :: ColorTable TextureCubeMapColorTable :: ColorTable TextureColorTable :: ColorTable SharedTexturePalette :: ColorTable data PixelInternalFormat Alpha' :: PixelInternalFormat DepthComponent' :: PixelInternalFormat Luminance' :: PixelInternalFormat LuminanceAlpha' :: PixelInternalFormat Intensity :: PixelInternalFormat RGB' :: PixelInternalFormat RGBA' :: PixelInternalFormat SRGB :: PixelInternalFormat SRGBAlpha :: PixelInternalFormat SLuminance :: PixelInternalFormat SLuminanceAlpha :: PixelInternalFormat Alpha4 :: PixelInternalFormat Alpha8 :: PixelInternalFormat Alpha12 :: PixelInternalFormat Alpha16 :: PixelInternalFormat DepthComponent16 :: PixelInternalFormat DepthComponent24 :: PixelInternalFormat DepthComponent32 :: PixelInternalFormat Luminance4 :: PixelInternalFormat Luminance8 :: PixelInternalFormat Luminance12 :: PixelInternalFormat Luminance16 :: PixelInternalFormat Luminance4Alpha4 :: PixelInternalFormat Luminance6Alpha2 :: PixelInternalFormat Luminance8Alpha8 :: PixelInternalFormat Luminance12Alpha4 :: PixelInternalFormat Luminance12Alpha12 :: PixelInternalFormat Luminance16Alpha16 :: PixelInternalFormat Intensity4 :: PixelInternalFormat Intensity8 :: PixelInternalFormat Intensity12 :: PixelInternalFormat Intensity16 :: PixelInternalFormat R3G3B2 :: PixelInternalFormat RGB4 :: PixelInternalFormat RGB5 :: PixelInternalFormat RGB8 :: PixelInternalFormat RGB10 :: PixelInternalFormat RGB12 :: PixelInternalFormat RGB16 :: PixelInternalFormat RGBA2 :: PixelInternalFormat RGBA4 :: PixelInternalFormat RGB5A1 :: PixelInternalFormat RGBA8 :: PixelInternalFormat RGB10A2 :: PixelInternalFormat RGBA12 :: PixelInternalFormat RGBA16 :: PixelInternalFormat SRGB8 :: PixelInternalFormat SRGB8Alpha8 :: PixelInternalFormat SLuminance8 :: PixelInternalFormat SLuminance8Alpha8 :: PixelInternalFormat CompressedAlpha :: PixelInternalFormat CompressedLuminance :: PixelInternalFormat CompressedLuminanceAlpha :: PixelInternalFormat CompressedIntensity :: PixelInternalFormat CompressedRGB :: PixelInternalFormat CompressedRGBA :: PixelInternalFormat CompressedSRGB :: PixelInternalFormat CompressedSRGBAlpha :: PixelInternalFormat CompressedSLuminance :: PixelInternalFormat CompressedSLuminanceAlpha :: PixelInternalFormat colorTable :: Proxy -> ColorTable -> PixelInternalFormat -> GLsizei -> PixelData a -> GL () getColorTable :: ColorTable -> PixelData a -> GL () copyColorTable :: ColorTable -> PixelInternalFormat -> Position -> GLsizei -> GL () colorSubTable :: ColorTable -> GLsizei -> GLsizei -> PixelData a -> GL () copyColorSubTable :: ColorTable -> GLsizei -> Position -> GLsizei -> GL () 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 Proxy instance Ord Proxy instance Show Proxy instance Eq ColorTable instance Ord ColorTable instance Show ColorTable instance Eq ColorTableStage instance Ord ColorTableStage instance Show ColorTableStage -- | This module corresponds to a part of section 3.6.1 (Pixel Storage -- Modes) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.PixelRectangles.Convolution data ConvolutionTarget Convolution1D :: ConvolutionTarget Convolution2D :: ConvolutionTarget Separable2D :: ConvolutionTarget convolution :: ConvolutionTarget -> StateVar Capability convolutionFilter1D :: PixelInternalFormat -> GLsizei -> PixelData a -> GL () getConvolutionFilter1D :: PixelData a -> GL () convolutionFilter2D :: PixelInternalFormat -> Size -> PixelData a -> GL () getConvolutionFilter2D :: PixelData a -> GL () separableFilter2D :: PixelInternalFormat -> Size -> PixelData a -> PixelData a -> GL () getSeparableFilter2D :: PixelData a -> PixelData a -> GL () copyConvolutionFilter1D :: PixelInternalFormat -> Position -> GLsizei -> GL () copyConvolutionFilter2D :: PixelInternalFormat -> Position -> Size -> GL () 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 ConvolutionBorderMode instance Ord ConvolutionBorderMode instance Show ConvolutionBorderMode instance Eq ConvolutionParameter instance Ord ConvolutionParameter instance Show ConvolutionParameter instance Eq ConvolutionTarget instance Ord ConvolutionTarget instance Show ConvolutionTarget -- | This module corresponds to a part of section 3.6.1 (Pixel Storage -- Modes) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.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 -> GL () resetHistogram :: GL () histogramRGBASizes :: Proxy -> GettableStateVar (Color4 GLsizei) histogramLuminanceSize :: Proxy -> GettableStateVar GLsizei -- | This module corresponds to a part of section 3.6.1 (Pixel Storage -- Modes) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.PixelRectangles.Minmax minmax :: StateVar (Maybe (PixelInternalFormat, Sink)) getMinmax :: Reset -> PixelData a -> GL () resetMinmax :: GL () -- | This module corresponds to section 3.6 (Pixel Rectangles) of the -- OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.PixelRectangles -- | This module corresponds to section 3.5 (Polygons) of the OpenGL 2.1 -- specs. module Graphics.Rendering.OGL.GL.Polygons polygonSmooth :: StateVar Capability cullFace :: StateVar (Maybe Face) class PolygonStipple s withNewPolygonStipple :: (PolygonStipple s) => (Ptr GLubyte -> GL ()) -> GL s withPolygonStipple :: (PolygonStipple s) => s -> (Ptr GLubyte -> GL a) -> GL a newPolygonStipple :: (PolygonStipple s) => [GLubyte] -> GL s getPolygonStippleComponents :: (PolygonStipple s) => s -> GL [GLubyte] data GLpolygonstipple polygonStipple :: (PolygonStipple s) => StateVar (Maybe s) data PolygonMode Point :: PolygonMode Line :: PolygonMode Fill :: PolygonMode polygonMode :: StateVar (PolygonMode, PolygonMode) polygonOffset :: StateVar (GLfloat, GLfloat) polygonOffsetPoint :: StateVar Capability polygonOffsetLine :: StateVar Capability polygonOffsetFill :: StateVar Capability instance Eq GLpolygonstipple instance Ord GLpolygonstipple instance Show GLpolygonstipple instance PolygonStipple GLpolygonstipple -- | This module corresponds to section 5.1 (Evaluators) of the OpenGL 2.1 -- specs. module Graphics.Rendering.OGL.GL.Evaluators type Order = GLint maxOrder :: GettableStateVar Order class (Storable d) => Domain d evalCoord1 :: (Domain d, MonadGL m) => d -> m () evalCoord1v :: (Domain d, MonadGL m) => Ptr d -> m () evalCoord2 :: (Domain d, MonadGL m) => (d, d) -> m () evalCoord2v :: (Domain d, MonadGL m) => Ptr d -> m () data (Domain d) => MapDescriptor d MapDescriptor :: (d, d) -> Stride -> Order -> NumComponents -> MapDescriptor d class ControlPoint c class Map1 m withNewMap1 :: (Map1 m, ControlPoint c, Domain d) => MapDescriptor d -> (Ptr d -> GL ()) -> GL (m c d) withMap1 :: (Map1 m, ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> Ptr d -> GL a) -> GL a newMap1 :: (Map1 m, ControlPoint c, Domain d) => (d, d) -> [c d] -> GL (m c d) getMap1Components :: (Map1 m, ControlPoint c, Domain d) => m c d -> GL ((d, d), [c d]) data (ControlPoint c, Domain d) => GLmap1 c d map1 :: (Map1 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d)) class Map2 m withNewMap2 :: (Map2 m, ControlPoint c, Domain d) => MapDescriptor d -> MapDescriptor d -> (Ptr d -> GL ()) -> GL (m c d) withMap2 :: (Map2 m, ControlPoint c, Domain d) => m c d -> (MapDescriptor d -> MapDescriptor d -> Ptr d -> GL a) -> GL a newMap2 :: (Map2 m, ControlPoint c, Domain d) => (d, d) -> (d, d) -> [[c d]] -> GL (m c d) getMap2Components :: (Map2 m, ControlPoint c, Domain d) => m c d -> GL ((d, d), (d, d), [[c d]]) data (ControlPoint c, Domain d) => GLmap2 c d map2 :: (Map2 m, ControlPoint c, Domain d) => StateVar (Maybe (m c d)) mapGrid1 :: (Domain d) => StateVar (GLint, (d, d)) mapGrid2 :: (Domain d) => StateVar ((GLint, (d, d)), (GLint, (d, d))) evalMesh1 :: PolygonMode -> (GLint, GLint) -> GL () evalMesh2 :: PolygonMode -> (GLint, GLint) -> (GLint, GLint) -> GL () evalPoint1 :: GLint -> PrimitiveGL () evalPoint2 :: (GLint, GLint) -> PrimitiveGL () autoNormal :: StateVar Capability instance (Eq d, Domain d, ControlPoint c) => Eq (GLmap2 c d) instance (Ord d, Domain d, ControlPoint c) => Ord (GLmap2 c d) instance (Show d, Domain d, ControlPoint c) => Show (GLmap2 c d) instance (Eq d, Domain d, ControlPoint c) => Eq (GLmap1 c d) instance (Ord d, Domain d, ControlPoint c) => Ord (GLmap1 c d) instance (Show d, Domain d, ControlPoint c) => Show (GLmap1 c d) instance (Eq d, Domain d) => Eq (MapDescriptor d) instance (Ord d, Domain d) => Ord (MapDescriptor d) instance (Show d, Domain d) => Show (MapDescriptor d) instance Map2 GLmap2 instance Map1 GLmap1 -- | This module corresponds to section 4.3 (Drawing, Reading, and Copying -- Pixels) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.ReadCopyPixels readPixels :: Position -> Size -> PixelData a -> GL () readBuffer :: StateVar BufferMode data PixelCopyType CopyColor :: PixelCopyType CopyDepth :: PixelCopyType CopyStencil :: PixelCopyType copyPixels :: Position -> Size -> PixelCopyType -> GL () instance Eq PixelCopyType instance Ord PixelCopyType instance Show PixelCopyType -- | This module corresponds to section 3.3 (Points) of the OpenGL 2.1 -- specs. module Graphics.Rendering.OGL.GL.Points -- | pointSize 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 pointSmooth) or point sprites are enabled (see -- pointSprite). Both are initially disabled. -- -- The specified point size is multiplied with a distance attenuation -- factor and clamped to the specified pointSizeRange, and further -- clamped to the implementation-dependent point size range to produce -- the derived point size using -- --
-- derivedSize = clamp (size * sqrt (1 / (a + b * d + c * d^2))) ---- -- where d is the eye-coordinate distance from the eye to the -- vertex, and a, b, and c are the distance -- attenuation coefficients (see pointDistanceAttenuation). -- -- 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 -- Graphics.Rendering.OGL.GL.PerFragment.sampleCoverage) instead -- of allowing the point width to go below a given -- pointFadeThresholdSize. In this case, the width is further -- modified in the following manner: -- --
-- width = if derivedSize >= threshold then derivedSize else threshold ---- -- The point alpha value is modified by computing: -- --
-- alpha = if derivedSize >= threshold then 1 else (derivedSize / threshold)^2 ---- -- 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 (x, y) of the -- pixel fragment that represents the point is computed as -- --
-- (x, y) = (floor xw + 0.5, floor yw + 0.5) ---- -- where xw and yw indicate window coordinates. All pixels -- that lie within the square grid of the rounded size centered at -- (x, y) make up the fragment. If the size is even, the -- center point is -- --
-- (x, y) = (floor (xw + 0.5), floor (yw + 0.5)) ---- -- and the rasterized fragment's centers are the half-integer window -- coordinates within the square of the rounded size centered at -- (x, y). 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 (xw, yw). 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 smoothPointSizeRange and -- smoothPointSizeGranularity, respectively. For aliased points, -- query the supported range with aliasedPointSizeRange. -- -- The point size specified when pointSize 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 Graphics.Rendering.OGL.GLU.Errors.InvalidValue is -- generated if pointSize is set to a value less than or equal to -- zero. -- -- An Graphics.Rendering.OGL.GLU.Errors.InvalidOperation is -- generated if pointSize is set during -- Graphics.Rendering.OGL.GL.BeginEnd.renderPrimitive. pointSize :: StateVar GLfloat vertexProgramPointSize :: StateVar Capability -- | The range to which the derived point size is clamped, see -- pointSize. Note that the size is further clamped to the -- implementation-dependent limits, see aliasedPointSizeRange and -- smoothPointSizeRange. The initial range is (0, 1). -- -- An Graphics.Rendering.OGL.GLU.Errors.InvalidValue 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 pointSize. The initial coefficients are (1, 0, 0). pointDistanceAttenuation :: StateVar (GLfloat, GLfloat, GLfloat) -- | The threshold for alpha attenuation of points when multisampling is -- used, see pointSize. The initial threshold is 1. -- -- An Graphics.Rendering.OGL.GLU.Errors.InvalidValue 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 -- Graphics.Rendering.OGL.GL.BasicTypes.Disabled. pointSmooth :: StateVar Capability -- | Controls whether point sprites are enabled. The initial state is -- Graphics.Rendering.OGL.GL.BasicTypes.Disabled. When point -- sprites are enabled, the state of point antialiasing (i.e. -- pointSmooth) 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.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.OGL.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 -> GL () texImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> PixelInternalFormat -> TextureSize2D -> Border -> PixelData a -> GL () texImage3D :: Proxy -> Level -> PixelInternalFormat -> TextureSize3D -> Border -> PixelData a -> GL () copyTexImage1D :: Level -> PixelInternalFormat -> Position -> TextureSize1D -> Border -> GL () copyTexImage2D :: Maybe CubeMapTarget -> Level -> PixelInternalFormat -> Position -> TextureSize2D -> Border -> GL () texSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> PixelData a -> GL () texSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> PixelData a -> GL () texSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> PixelData a -> GL () getTexImage :: Either TextureTarget CubeMapTarget -> Level -> PixelData a -> GL () copyTexSubImage1D :: Level -> TexturePosition1D -> Position -> TextureSize1D -> GL () copyTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> Position -> TextureSize2D -> GL () copyTexSubImage3D :: Level -> TexturePosition3D -> Position -> TextureSize2D -> GL () 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 -> GL () compressedTexImage2D :: Maybe CubeMapTarget -> Proxy -> Level -> TextureSize2D -> Border -> CompressedPixelData a -> GL () compressedTexImage3D :: Proxy -> Level -> TextureSize3D -> Border -> CompressedPixelData a -> GL () compressedTexSubImage1D :: Level -> TexturePosition1D -> TextureSize1D -> CompressedPixelData a -> GL () compressedTexSubImage2D :: Maybe CubeMapTarget -> Level -> TexturePosition2D -> TextureSize2D -> CompressedPixelData a -> GL () compressedTexSubImage3D :: Level -> TexturePosition3D -> TextureSize3D -> CompressedPixelData a -> GL () getCompressedTexImage :: Either TextureTarget CubeMapTarget -> Level -> Ptr a -> GL () instance Eq (CompressedPixelData a) instance Ord (CompressedPixelData a) instance Show (CompressedPixelData a) instance Eq CompressedTextureFormat instance Ord CompressedTextureFormat instance Show CompressedTextureFormat instance Eq TextureSize3D instance Ord TextureSize3D instance Show TextureSize3D instance Eq TextureSize2D instance Ord TextureSize2D instance Show TextureSize2D instance Eq TextureSize1D instance Ord TextureSize1D instance Show TextureSize1D instance Eq TexturePosition3D instance Ord TexturePosition3D instance Show TexturePosition3D instance Eq TexturePosition2D instance Ord TexturePosition2D instance Show TexturePosition2D instance Eq TexturePosition1D instance Ord TexturePosition1D instance Show TexturePosition1D -- | This module corresponds to section 3.8.15 (Texture Application) of the -- OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.Texturing.Application texture :: TextureTarget -> StateVar Capability -- | This module offers various texture queries. module Graphics.Rendering.OGL.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) textureIntensitySize :: TextureQuery GLsizei textureLuminanceSize :: TextureQuery GLsizei textureIndexSize :: TextureQuery GLsizei textureDepthBits :: TextureQuery GLsizei textureCompressedImageSize :: TextureQuery (Maybe GLsizei) textureProxyOK :: TextureQuery Bool -- | This module corresponds to section 3.8.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.OGL.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 TextureCompareOperator instance Ord TextureCompareOperator instance Show TextureCompareOperator instance Eq Clamping instance Ord Clamping instance Show Clamping instance Eq Repetition instance Ord Repetition instance Show Repetition instance Eq TextureFilter instance Ord TextureFilter instance Show TextureFilter -- | This module corresponds to section 3.8.13 (Texture Environments and -- Texture Functions) of the OpenGL 2.1 specs. module Graphics.Rendering.OGL.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 Src instance Ord Src instance Show Src instance Eq Arg instance Ord Arg instance Show Arg instance Eq ArgNum instance Ord ArgNum instance Show ArgNum instance Eq TextureCombineFunction instance Ord TextureCombineFunction instance Show TextureCombineFunction instance Eq TextureFunction instance Ord TextureFunction instance Show TextureFunction -- | This module corresponds to section 3.8.12 (Texture Objects) of the -- OpenGL 2.1 specs. module Graphics.Rendering.OGL.GL.Texturing.Objects newtype TextureObject TextureObject :: GLuint -> TextureObject textureBinding :: TextureTarget -> StateVar (Maybe TextureObject) textureResident :: TextureTarget -> GettableStateVar Bool areTexturesResident :: [TextureObject] -> GL ([TextureObject], [TextureObject]) type TexturePriority = GLclampf texturePriority :: TextureTarget -> StateVar TexturePriority prioritizeTextures :: [(TextureObject, TexturePriority)] -> GL () 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.OGL.GL.Texturing -- | A Haskell binding for OpenGL, the industry's most widely used and -- supported 2D and 3D graphics API. module Graphics.Rendering.OGL.GL -- | This module corresponds to chapter 2 (Initialization) of the GLU -- specs. module Graphics.Rendering.OGL.GLU.Initialization gluVersion :: GettableStateVar String gluExtensions :: GettableStateVar [String] instance Eq StringName instance Ord StringName instance Show StringName -- | This module corresponds to chapter 3 (Mipmapping) of the GLU specs. module Graphics.Rendering.OGL.GLU.Mipmapping scaleImage :: Size -> PixelData a -> Size -> PixelData b -> GL () build1DMipmaps :: TextureTarget -> PixelInternalFormat -> GLsizei -> PixelData a -> GL () build2DMipmaps :: TextureTarget -> PixelInternalFormat -> GLsizei -> GLsizei -> PixelData a -> GL () -- | This module corresponds to chapter 4 (Matrix Manipulation) of the GLU -- specs. module Graphics.Rendering.OGL.GLU.Matrix ortho2D :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> GL () perspective :: GLdouble -> GLdouble -> GLdouble -> GLdouble -> GL () lookAt :: Vertex3 GLdouble -> Vertex3 GLdouble -> Vector3 GLdouble -> GL () pickMatrix :: (GLdouble, GLdouble) -> (GLdouble, GLdouble) -> (Position, Size) -> GL () project :: (Matrix m) => Vertex3 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> GL (Vertex3 GLdouble) unProject :: (Matrix m) => Vertex3 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> GL (Vertex3 GLdouble) unProject4 :: (Matrix m) => Vertex4 GLdouble -> m GLdouble -> m GLdouble -> (Position, Size) -> GLclampd -> GLclampd -> GL (Vertex4 GLdouble) -- | This module corresponds to chapter 5 (Polygon Tessellation) of the GLU -- specs. module Graphics.Rendering.OGL.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. AnnotatedVertex) with associated -- weigths summing up to 1.0. data WeightedProperties v WeightedProperties :: (GLclampf, v) -> (GLclampf, v) -> (GLclampf, v) -> (GLclampf, v) -> WeightedProperties v -- | A function combining given vertex properties into a property for a -- newly generated vertex type Combiner v = Vertex3 GLdouble -> WeightedProperties v -> v data TessWinding TessWindingOdd :: TessWinding TessWindingNonzero :: TessWinding TessWindingPositive :: TessWinding TessWindingNegative :: TessWinding TessWindingAbsGeqTwo :: TessWinding -- | The relative tolerance under which two vertices can be combined (see -- Combiner). 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 Normal3 0 0 0, a fitting plane of all vertices is -- used. type Tessellator p v = TessWinding -> Tolerance -> Normal3 GLdouble -> Combiner v -> ComplexPolygon v -> GL (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 v) => Eq (SimplePolygon v) instance (Ord v) => Ord (SimplePolygon v) instance (Eq v) => Eq (Primitive v) instance (Ord v) => Ord (Primitive v) instance (Eq v) => Eq (Triangulation v) instance (Ord v) => Ord (Triangulation v) instance (Eq v) => Eq (Triangle v) instance (Ord v) => Ord (Triangle v) instance (Eq v) => Eq (PolygonContours v) instance (Ord v) => Ord (PolygonContours v) instance (Eq v) => Eq (SimpleContour v) instance (Ord v) => Ord (SimpleContour v) instance (Eq v) => Eq (WeightedProperties v) instance (Ord v) => Ord (WeightedProperties v) instance (Eq v) => Eq (ComplexPolygon v) instance (Ord v) => Ord (ComplexPolygon v) instance (Eq v) => Eq (ComplexContour v) instance (Ord v) => Ord (ComplexContour v) instance (Eq v) => Eq (AnnotatedVertex v) instance (Ord v) => Ord (AnnotatedVertex v) instance Eq TessWinding instance Ord TessWinding instance Show TessWinding instance (Storable v) => Storable (AnnotatedVertex v) -- | This module corresponds to chapter 6 (Quadrics) of the GLU specs. module Graphics.Rendering.OGL.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 -> GL () instance Eq QuadricObj instance Eq QuadricPrimitive instance Ord QuadricPrimitive instance Eq QuadricStyle instance Ord QuadricStyle instance Eq QuadricTexture instance Ord QuadricTexture instance Eq QuadricOrientation instance Ord QuadricOrientation instance Show QuadricOrientation instance Eq QuadricCallback instance Ord QuadricCallback instance Show QuadricCallback instance Eq QuadricDrawStyle instance Ord QuadricDrawStyle instance Show QuadricDrawStyle -- | This module corresponds to chapter 7 (NURBS) of the GLU specs. module Graphics.Rendering.OGL.GLU.NURBS data NURBSObj withNURBSObj :: a -> (NURBSObj -> GL a) -> GL a type NURBSBeginCallback = PrimitiveMode -> GL () withNURBSBeginCallback :: NURBSObj -> NURBSBeginCallback -> GL a -> GL a type NURBSVertexCallback = Vertex3 GLfloat -> GL () withNURBSVertexCallback :: NURBSObj -> NURBSVertexCallback -> GL a -> GL a type NURBSNormalCallback = Normal3 GLfloat -> GL () withNURBSNormalCallback :: NURBSObj -> NURBSNormalCallback -> GL a -> GL a type NURBSColorCallback = Color4 GLfloat -> GL () withNURBSColorCallback :: NURBSObj -> NURBSColorCallback -> GL a -> GL a type NURBSEndCallback = GL () withNURBSEndCallback :: NURBSObj -> NURBSEndCallback -> GL a -> GL a checkForNURBSError :: NURBSObj -> GL a -> GL a nurbsBeginEndCurve :: NURBSObj -> GL a -> GL a nurbsCurve :: (ControlPoint c) => NURBSObj -> GLint -> Ptr GLfloat -> GLint -> Ptr (c GLfloat) -> GLint -> GL () nurbsBeginEndSurface :: NURBSObj -> GL a -> GL a nurbsSurface :: (ControlPoint c) => NURBSObj -> GLint -> Ptr GLfloat -> GLint -> Ptr GLfloat -> GLint -> GLint -> Ptr (c GLfloat) -> GLint -> GLint -> GL () class TrimmingPoint p nurbsBeginEndTrim :: NURBSObj -> GL a -> GL a pwlCurve :: (TrimmingPoint p) => NURBSObj -> GLint -> Ptr (p GLfloat) -> GLint -> GL () trimmingCurve :: (TrimmingPoint c) => NURBSObj -> GLint -> Ptr GLfloat -> GLint -> Ptr (c GLfloat) -> GLint -> GL () data NURBSMode NURBSTessellator :: NURBSMode NURBSRenderer :: NURBSMode setNURBSMode :: NURBSObj -> NURBSMode -> GL () setNURBSCulling :: NURBSObj -> Capability -> GL () data SamplingMethod PathLength :: GLfloat -> SamplingMethod ParametricError :: GLfloat -> SamplingMethod DomainDistance :: GLfloat -> GLfloat -> SamplingMethod ObjectPathLength :: GLfloat -> SamplingMethod ObjectParametricError :: GLfloat -> SamplingMethod setSamplingMethod :: NURBSObj -> SamplingMethod -> GL () loadSamplingMatrices :: (Matrix m1, Matrix m2) => NURBSObj -> Maybe (m1 GLfloat, m2 GLfloat, (Position, Size)) -> GL () data DisplayMode' Fill' :: DisplayMode' OutlinePolygon :: DisplayMode' OutlinePatch :: DisplayMode' setDisplayMode' :: NURBSObj -> DisplayMode' -> GL () instance Eq DisplayMode' instance Ord DisplayMode' instance Show DisplayMode' instance Eq SamplingMethod instance Ord SamplingMethod instance Show SamplingMethod instance Eq NURBSMode instance Ord NURBSMode instance Show NURBSMode instance TrimmingPoint Vertex3 instance TrimmingPoint Vertex2 -- | A Haskell binding for GLU, OpenGL's accompanying utility library. module Graphics.Rendering.OGL.GLU -- | A convenience module, combining the Haskell bindings for GL and GLU. module Graphics.Rendering.OGL