|
Graphics.Rendering.OpenGL.GL.VertexSpec | Portability | portable | Stability | stable | Maintainer | sven.panne@aedion.de |
|
|
|
|
|
Description |
This module corresponds to section 2.7 (Vertex Specification) of the
OpenGL 2.1 specs.
|
|
Synopsis |
|
|
|
|
Vertex Coordinates
|
|
|
Specify the (x, y, z, w) coordinates of a four-dimensional vertex.
This must only be done during
renderPrimitive, 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.
| | Methods | | | Instances | |
|
|
class VertexComponent a | Source |
|
The class of all types which can be used as a vertex coordinate.
| | Instances | |
|
|
|
A vertex with z=0 and w=1.
| Constructors | | Instances | |
|
|
|
A vertex with w=1.
| Constructors | | Instances | |
|
|
|
A fully-fledged four-dimensional vertex.
| Constructors | | Instances | |
|
|
Auxiliary Vertex Attributes
|
|
Apart from its coordinates in four-dimensional space, every vertex has
associated auxiliary attributes: Its texture coordinates, a normal, a
fog coordinate, and a color plus a secondary color. For every attribute, the
OpenGL state contains its current value, which can be changed at any time.
Every attribute has a "natural" format via which it can be manipulated
directly as part of the OpenGL state, e.g. the current texture coordinates
are internally handled as TexCoord4 GLfloat. Different formats are
converted to this format, e.g. the s, r, and t coordinates of a
TexCoord3 GLint are converted to floating point values and a q
coordinate of 1.0 is implicitly assumed.
Consequently, the vast majority of classes, functions, and data types in this
module are for convenience only and offer no additional functionality.
|
|
Texture Coordinates
|
|
|
The current texture coordinates (s, t, r, q) for the current
texture unit (see activeTexture).
The initial value is (0,0,0,1) for all texture units.
|
|
|
Change the current texture coordinates of the current or given texture
unit.
| | Methods | | | Instances | |
|
|
class TexCoordComponent a | Source |
|
The class of all types which can be used as a texture coordinate.
| | Instances | |
|
|
|
Texture coordinates with t=0, r=0, and q=1.
| Constructors | | Instances | |
|
|
|
Texture coordinates with r=0 and q=1.
| Constructors | | Instances | |
|
|
|
Texture coordinates with q=1.
| Constructors | | Instances | |
|
|
|
Fully-fledged four-dimensional texture coordinates.
| Constructors | | Instances | |
|
|
Normal
|
|
|
The current normal (x, y, z). The initial value is the unit vector
(0, 0, 1).
|
|
|
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 normal or normalv need not have unit length.
If normalize is enabled, then
normals of any length specified with normal or normalv are normalized
after transformation. If
rescaleNormal is enabled, normals
are scaled by a scaling factor derived from the modelview matrix.
rescaleNormal 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.
| | Methods | | | Instances | |
|
|
class NormalComponent a | Source |
|
The class of all types which can be used as a component of a normal.
| | Instances | |
|
|
|
Constructors | | Instances | |
|
|
Fog Coordinate
|
|
|
The current fog coordinate. The initial value is 0.
|
|
|
Change the current fog coordinate.
| | Methods | | | Instances | |
|
|
class FogCoordComponent a | Source |
|
The class of all types which can be used as the fog coordinate.
| | Instances | |
|
|
|
A fog coordinate.
| Constructors | | Instances | |
|
|
Color and Secondary Color
|
|
|
If rgbaMode contains True, the color buffers store RGBA value. If
color indexes are stored, it contains False.
|
|
|
|
|
Change the current color.
| | Methods | | | Instances | |
|
|
|
|
class SecondaryColor a where | Source |
|
Change the current secondary color.
| | Methods | | | Instances | |
|
|
|
The class of all types which can be used as a color component.
| | Instances | |
|
|
|
Constructors | | Instances | |
|
|
|
A fully-fledged RGBA color.
| Constructors | | Instances | |
|
|
|
|
|
Change the current color index.
| | Methods | | | Instances | |
|
|
|
The class of all types which can be used as a color index.
| | Instances | |
|
|
|
A color index.
| Constructors | | Instances | |
|
|
Generic Vertex Attributes
|
|
|
Constructors | | Instances | |
|
|
|
| Instances | |
|
|
class VertexAttribComponent a where | Source |
|
The class of all types which can be used as a generic vertex attribute.
| | Methods | | | Instances | |
|
|
Texture Units
|
|
|
Identifies a texture unit via its number, which must be in the range of
(0 .. maxTextureUnit).
| Constructors | | Instances | |
|
|
|
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.
|
|
Produced by Haddock version 0.9 |