OpenGL 1.x ------------------------------------------------ 2D simple1 draws a white filled rectangle on a black background simple2 draws a rectangle with vertices of different colors; note the color blending done by OpenGL, this is called smooth shading, and it's the default. simple3 a simple openGL program for drawing lines, points and polygons simple4 draw an n-gon with n vertices, moving left/right when press l/r keys the movement is implemented by keeping track of the center fof the polygon as a global variable, and moving it L/R simple5 based on simple4.c, draws a polygon with n vertices, where n can be increased and decreased with key strokes. Demonstrates a timerfunc(). grid1 does the necessary gl setup (transformations) and draws the boundary of the grid on the screen can also move up/down/left/right by accumulating the total translation vectpr in a global variable pos[] grid11 same as grid1, ie draw the boundary of the grid on scree; except that moving left/right/up/down is done via instant calls to glTranslatef() instead of accumulating all translates in some global variable pos[] grid12 same as grid11 + handle rotation around z can rotate via instant calls to glRotate() ------------------------------------------------ 3D simple6 draws a cube in 3D simple7 Draw and move a cube around in 3D. grid2 render grid boundary (as 2 triangles) in 3D with a perspective projection can move left/right/up/down and rotate on key press