Basic Shapes
Let's take a look at our first OpenGL program. Download the "basic shapes" program, and compile and run it (details on how to do that can be found in "Getting OpenGL Set Up"). Take a look at it, and hit Esc when you're done. It should look like the following image:Overview of How the Program Works
How does the program work? The basic idea is that we tell OpenGL the 3D coordinates of all of the vertices of our shapes. OpenGL uses the standard x and y axes, with the positive x direction pointing toward the right and the positive y direction pointing upward. However, in 3D we need another dimension, the z dimension. The positive z direction points out of the screen.
Post a Comment Blogger Facebook
Click to see the code!
To insert emoticon you must added at least one space before the code.