OpenGL Programming/reference/glBegin

Description

 * Defines a list of points to make in to primitives.
 * The type of primitive is passed when you call it.

Allowed Primitive Types

 * [[OpenGL_Programming/reference/GL_POINTS
 * Each vertex is a single point
 * [[OpenGL_Programming/reference/GL_LINES
 * Must be a multiple of 2
 * Each pair of vertices is a independent line segment.
 * [[OpenGL_Programming/reference/GL_LINE_STRIP
 * Draws a connected group of line segments from the first vertex to the last. After the first Vertices each additonal Vertices draws a new line.
 * [[OpenGL_Programming/reference/GL_LINE_LOOP
 * Draws a connected group of line segments from the first vertex to the last. The last line is defined by the first and last vertex makeing a closed loop.
 * [[OpenGL_Programming/reference/GL_TRIANGLES
 * Each triplet of vertices as an independent triangle.
 * Must be a multiple of 3
 * [[OpenGL_Programming/reference/GL_TRIANGLE_STRIP
 * Draws a connected group of triangles. After the first 2 vertices each additonal point defines a new triangle. The triangle is made up of the last 2 and the newest vertex moving down the list.
 * [[OpenGL_Programming/reference/GL_TRIANGLE_FAN
 * Draws a connected group of triangles. After the first 2 vertices each additonal point defines a new triangle. The triangle is made up of the first the last and the newest vertex moving down the list.
 * [[OpenGL_Programming/reference/GL_QUADS
 * Each group of four vertices as an independent quadriliteral.
 * Must be a multiple of 4
 * [[OpenGL_Programming/reference/GL_QUAD_STRIP
 * Draws a connected group of quadriliterals. After the first 2 Vertices each additonal pair Vertices makes a new quadriliteral.
 * Must be a multiple of 2 after the first 2 Vertices.
 * [[OpenGL_Programming/reference/GL_POLYGON
 * Draws a single polygon. same as GL_LINE_STRIP
 * Must have 3 or more Vertices.

Functions allowed inside a glBegin glEnd section

 * glVertex
 * glColor
 * glIndex
 * glNormal
 * glTexCoord
 * glEvalCoord
 * glEvalPoint
 * glMaterial
 * glEdgeFlag
 * glCallList
 * glCallLists