Now you have your scene looking a little nicer with some lighting, but all objects are a gray colour. Here we will learn how to assign materials to shapes to change how they look under different lighting conditions.
Flatly colouring shapes is perfect, if we want an unrealistic look to our scene. But for realism, we really want to add some sort of lighting system. You can learn here how to use OpenGL's lighting system for a more realistic scene.
Drawing shapes is fine, moving them about is fine. But do you always want a shape to be the same size? Are all tree's the same height? Of course not. Here I will show you how to scale your 3D shapes.
Colours can be mixed and matched in OpenGL, just like in real life. Here you will learn how to blend shapes using OpenGL, allowing you to overlay shapes on top of each other to get the most realism you can.
While single buffering still displays our final image, it can cause artifacts. Double buffering lets us draw everything in a second buffer, and when finished, lets us transfer it to the screen for a smoother application.
Placing objects in a 3D scene is nice, but often enough, you want to be able to move and interact with these shapes. Here you will learn how to rotate them with a single command.
From basic 2D shapes, 3D shapes are built. And whilst complex, there are some which are provided to us by GLUT, one of those being your standard cube, made up of 12 triangles and 8 vertices, why hand code it yourself?
Colour is one of the fundamental building blocks of a scene. Colours can be used to portray mood, realsim, fictions, intensity, or anything else. It's up to the artist, and in this case, you are the artist.
One of the very first things you will want to do with OpenGL is learn how to draw shapes. OpenGL provides some basic shapes, which can then used to make complex 3D objects.
Keyboard interaction can be handled by the user using system API calls, but why do that when you are already using GLUT which can handle this for you? This tutorial will focus on getting and using the keyboard with the help of GLUT.