21.06.2014 Views

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

OpenGL 4.2 (Compatibility Profile) - April 27, 2012

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

2.6. BEGIN/END PARADIGM 22<br />

Processed<br />

Vertices<br />

Coordinates<br />

Associated<br />

Data<br />

Point,<br />

Line Segment, or<br />

Polygon<br />

(Primitive)<br />

Assembly<br />

Point culling;<br />

Line Segment<br />

or Polygon<br />

Clipping<br />

Color<br />

Processing<br />

Rasterization<br />

Begin/End<br />

State<br />

Figure 2.3. Primitive assembly and processing.<br />

colors may be affected or replaced by lighting, and texture coordinates are transformed<br />

and possibly affected by a texture coordinate generation function. The<br />

processing indicated for each current value is applied for each vertex that is sent to<br />

the GL.<br />

The methods by which vertices, normals, texture coordinates, fog coordinate,<br />

generic attributes, and colors are sent to the GL, as well as how normals are transformed<br />

and how vertices are mapped to the two-dimensional screen, are discussed<br />

later.<br />

Before colors have been assigned to a vertex, the state required by a vertex<br />

is the vertex’s coordinates, the current normal, the current edge flag (see section<br />

2.6.2), the current material properties (see section 2.13.2), the current fog coordinate,<br />

the multiple generic vertex attribute sets, and the multiple current texture<br />

coordinate sets. Because color assignment is done vertex-by-vertex, a processed<br />

vertex comprises the vertex’s coordinates, its edge flag, its fog coordinate, its assigned<br />

colors, and its multiple texture coordinate sets.<br />

Figure 2.3 shows the sequence of operations that builds a primitive (point, line<br />

segment, or polygon) from a sequence of vertices. After a primitive is formed, it<br />

is clipped to a clip volume. This may alter the primitive by altering vertex coordinates,<br />

texture coordinates, and colors. In the case of line and polygon primitives,<br />

clipping may insert new vertices into the primitive. The vertices defining a primitive<br />

to be rasterized have texture coordinates and colors associated with them.<br />

<strong>OpenGL</strong> <strong>4.2</strong> (<strong>Compatibility</strong> <strong>Profile</strong>) - <strong>April</strong> <strong>27</strong>, <strong>2012</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!