OpenGL Programming/reference/glBegin

DescriptionEdit

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

Useage ContextEdit

Allowed Primitive TypesEdit

  • [[OpenGL_Programming/reference/L_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 newist 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 newist 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 sectionEdit

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

Useage ExamplesEdit

functon definitionsEdit

Related functionsEdit

ReferencesEdit

http://www.cs.utk.edu/~vose/c-stuff/opengl/glBegin.html

Last modified on 7 August 2009, at 02:28