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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2.6. BEGIN/END PARADIGM 30<br />

maximum patch size (the value of MAX_PATCH_VERTICES). The patch size is initially<br />

three vertices.<br />

If the number of vertices in a patch is given by v, the vi + 1st through vi + vth<br />

vertices (in that order) determine a patch for each i = 0, 1, . . . n − 1, where there<br />

are vn + k vertices. k is in the range [0, v − 1]; if k is not zero, the final k vertices<br />

are ignored.<br />

General Considerations For Polygon Primitives<br />

Depending on the current state of the GL, a polygon primitive generated<br />

from a drawing command with mode POLYGON, QUADS, QUAD_STRIP,<br />

TRIANGLE_FAN, TRIANGLE_STRIP, TRIANGLES, TRIANGLES_ADJACENCY, or<br />

TRIANGLE_STRIP_ADJACENCY may be rendered in one of several ways, such as<br />

outlining its border or filling its interior. The order of vertices in such a primitive<br />

is significant in lighting, polygon rasterization, and fragment shading (see<br />

sections 2.13.1, 3.6.1, and 3.13.2). Only convex polygons are guaranteed to be<br />

drawn correctly by the GL. If a specified polygon is nonconvex when projected<br />

onto the window, then the rendered polygon need only lie within the convex hull<br />

of the projected vertices defining its boundary.<br />

The state required for Begin and End consists of a sixteen-valued integer indicating<br />

either one of the possible Begin / End modes, or that no Begin / End mode<br />

is being processed.<br />

Calling Begin will result in an INVALID_FRAMEBUFFER_OPERATION error if<br />

the object bound to DRAW_FRAMEBUFFER_BINDING is not framebuffer complete<br />

(see section 4.4.4).<br />

2.6.2 Polygon Edges<br />

Each edge of each polygon primitive generated is flagged as either boundary or<br />

non-boundary. These classifications are used during polygon rasterization; some<br />

modes affect the interpretation of polygon boundary edges (see section 3.6.4). By<br />

default, all edges are boundary edges, but the flagging of polygons, separate triangles,<br />

or separate quadrilaterals may be altered by calling<br />

void EdgeFlag( boolean flag );<br />

void EdgeFlagv( const boolean *flag );<br />

to change the value of a flag bit. If flag is zero, then the flag bit is set to FALSE; if<br />

flag is non-zero, then the flag bit is set to TRUE.<br />

When Begin is supplied with one of the argument values POLYGON,<br />

TRIANGLES, or QUADS, each vertex specified within a Begin and End pair begins<br />

an edge. If the edge flag bit is TRUE, then each specified vertex begins an edge<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!