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.22. FLATSHADING 210<br />

Primitive type of polygon i First vertex convention Last vertex convention<br />

point i i<br />

independent line 2i − 1 2i<br />

line loop i i + 1, if i < n<br />

1, if i = n<br />

line strip i i + 1<br />

independent triangle 3i − 2 3i<br />

triangle strip i i + 2<br />

triangle fan i + 1 i + 2<br />

independent quad 4i − 3 4i 1<br />

4i 4i 2<br />

quad strip 2i − 1 2i + 2 1<br />

2i + 2 2i + 2 2<br />

single polygon (i = 1) 1 1<br />

line adjacency 4i − 2 4i − 1<br />

line strip adjacency i + 1 i + 2<br />

triangle adjacency 6i − 5 6i − 1<br />

triangle strip adjacency 2i − 1 2i + 3<br />

Table 2.18: Provoking vertex selection. The vertex colors and/or output values<br />

used for flatshading the ith primitive generated by the indicated Begin / End type<br />

are derived from the corresponding values of the vertex whose index is shown in<br />

the table. Vertices are numbered 1 through n, where n is the number of vertices<br />

between the Begin / End pair.<br />

1 If the value of QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION is TRUE.<br />

2 If the value of QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION is FALSE.<br />

flatshaded colors and outputs, as shown in table 2.18<br />

The provoking vertex behavior of quad primitives is implementation dependent,<br />

and may be determined by calling GetBooleanv with the symbolic constant<br />

QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION. A return value of TRUE indicates<br />

that the provoking vertex mode is respected for quad primitives, while a<br />

return value of FALSE indicates that the implementation always behave as though<br />

the provoking vertex mode were LAST_VERTEX_CONVENTION.<br />

Flatshading of colors in fixed-function vertex processing, and of the builtin<br />

outputs gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor and<br />

gl_BackSecondaryColor when a vertex shader is active, is controlled with the<br />

command<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!