OpenGL Shape Demo

The OpenGL Shape Demo is intended to act as a sandbox for learning how the 10 OpenGL shape modes work. Refer to the following picture and text below for a more detailed discussion:

Rendering Options

Dump Coordinates


You can dump the coordinates of what you draw in the Draw Area.
The coordinates are in normalized form. This means that that x and y values are scaled to lie in the range [0,1]. You will wish to scale the points to the size of your intended drawing target. To do this you should apply the following equations to the coordinates:
        x_scaled = target_x_min + (x_norm * target_width)
y_scaled = target_y_min + (y_norm * target_height)