The number of vertices stored in memory is reduced from 3N to N+2, where N is the number of triangles to be drawn.
#Gl polygon count modo 801 series#
The primary reason to use triangle strips is to reduce the amount of data needed to create a series of triangles. They are more efficient than triangle lists without indexing, but usually equally fast or slower than indexed triangle lists. Modes that require a certain multiple of vertices are GL_LINES (2), GL_TRIANGLES (3), GL_QUADS (4), and GL_QUAD_STRIP (2).Diagram of four triangles, 1, 2, 3, and 4, with vertices A, B, C, D, E, and F.Ī triangle strip is a series of connected triangles from the triangle mesh, sharing vertices, allowing for more efficient memory usage for computer graphics.
The minimum specification of vertices for each primitive is: Minimum number of vertices
The incomplete primitive is ignored the complete primitives are 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. Lines, triangles, quadrilaterals, and polygons that are incompletely specified are not drawn. Regardless of the value chosen for mode in glBegin, there is no limit to the number of vertices you can define between glBegin and glend. If any other OpenGL function is called between glBegin and glend, the error flag is set and the function is ignored. You can also use glCallList or glCallLists to execute display lists that include only the preceding functions. You can use only a subset of OpenGL functions between glBegin and glend. Taking n as an integer count starting at one, and N as the total number of vertices specified, the interpretations are as follows: The glBegin function accepts a single argument that specifies which of ten primitives the vertices compose. The glBegin and glend functions delimit the vertices that define a primitive or a group of like primitives. The function glend was called before the corresponding glBegin was called, or glBegin was called within a glBegin/ glend sequence. NameĪ function other than glVertex, glColor, glIndex, glNormal, glTexCoord, glEvalCoord, glEvalPoint, glMaterial, glEdgeFlag, glCallList, or glCallLists was called between glBegin and the corresponding glend. The following error codes can be retrieved by the glGetError function. Vertices 1 through N define this polygon. Note that the order in which vertices are used to construct a quadrilateral from strip data is different from that used with independent data.ĭraws a single, convex polygon. Vertices 2n - 1, 2n, 2n + 2, and 2n + 1 define quadrilateral n. One quadrilateral is defined for each pair of vertices presented after the first pair. N/4 quadrilaterals are drawn.ĭraws a connected group of quadrilaterals.
Vertices 4n - 3, 4n - 2, 4n - 1, and 4n define quadrilateral n. Treats each group of four vertices as an independent quadrilateral. Vertices 1, n + 1, n + 2 define triangle n. one triangle is defined for each vertex presented after the first two vertices. N - 2 triangles are drawn.ĭraws a connected group of triangles. For even n, vertices n + 1, n, and n + 2 define triangle n. For odd n, vertices n, n + 1, and n + 2 define triangle n. One triangle is defined for each vertex presented after the first two vertices.
N/3 triangles are drawn.ĭraws a connected group of triangles. Vertices 3n - 2, 3n - 1, and 3n define triangle n. Treats each triplet of vertices as an independent triangle. The last line, however, is defined by vertices N and 1. N - 1 lines are drawn.ĭraws a connected group of line segments from the first vertex to the last, then back to the first. N/2 lines are drawn.ĭraws a connected group of line segments from the first vertex to the last. Treats each pair of vertices as an independent line segment. The following are accepted symbolic constants and their meanings: Value The primitive or primitives that will be created from vertices presented between glBegin and the subsequent glend. The glBegin and glend functions delimit the vertices of a primitive or a group of like primitives.