| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Description | |||||||||||||||||||||||||||
This module corresponds to section 2.6 (Begin/End Paradigm) of the OpenGL 2.1 specs. | |||||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
Begin and End Objects | |||||||||||||||||||||||||||
data PrimitiveMode | |||||||||||||||||||||||||||
renderPrimitive :: PrimitiveMode -> IO a -> IO a | |||||||||||||||||||||||||||
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 (vertex, vertexv), vertex colors (color, colorv, secondaryColor, secondaryColorv, index, indexv), normal (normal, normalv), texture coordinates (texCoord, texCoordv, multiTexCoord, multiTexCoordv), and fog coordinates (fogCoord, fogCoordv). Additionally, evalPoint1, evalPoint2, evalCoord1, evalCoord1v, evalCoord2, evalCoord2v, materialAmbient, materialDiffuse, materialAmbientAndDiffuse, materialSpecular, materialEmission, materialShininess, callList, callLists, and setting edgeFlag are allowed. Writing the respective state variables is allowed in the delimited action, too. Regardless of the chosen PrimitiveMode, there is no limit to the number of vertices that can be defined during a single renderPrimitive. 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 Lines (2), Triangles (3), Quads (4), and QuadStrip (2). | |||||||||||||||||||||||||||
unsafeRenderPrimitive :: PrimitiveMode -> IO a -> IO a | |||||||||||||||||||||||||||
A more efficient, but potentially dangerous version of renderPrimitive: The given action is not allowed to throw an exception. | |||||||||||||||||||||||||||
primitiveRestart :: IO () | |||||||||||||||||||||||||||
Polygon Edges | |||||||||||||||||||||||||||
data EdgeFlag | |||||||||||||||||||||||||||
| |||||||||||||||||||||||||||
edgeFlag :: StateVar EdgeFlag | |||||||||||||||||||||||||||
Each vertex of a polygon, separate triangle, or separate quadrilateral specified during renderPrimitive 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 polygonMode is set to Point or Line. Note that the current edge flag can be updated at any time, in particular during renderPrimitive. | |||||||||||||||||||||||||||
Produced by Haddock version 0.8 |