Chapter 3. Drawing in Space: Geometric Primitives and Buffers

by Richard S. Wright, Jr.

WHAT YOU'LL LEARN IN THIS CHAPTER:

How To

Functions You'll Use

Draw points, lines, and shapes

glBegin/glEnd/glVertex

Set shape outlines to wireframe or solid objects

glPolygonMode

Set point sizes for drawing

glPointSize

Set line drawing width

glLineWidth

Perform hidden surface removal

glCullFace/glClear

Set patterns for broken lines

glLineStipple

Set polygon fill patterns

glPolygonStipple

Use the OpenGL Scissor box

glScissor

Use the stencil buffer

glStencilFunc/glStencilMask/glStencilOp

If you've ever had a chemistry class (and probably even if you haven't), you know that all matter consists of atoms and that all atoms consist of only three things: protons, neutrons, and electrons. ...

Get OpenGL® SuperBible, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.