In this article, I will demonstrate how to apply 2D textures to your 3D models. I will also show how to define lights in your scene that are used to illuminate the objects in your scene.
I assume that the reader has a basic knowledge of C++ and how to create and compile C++ programs. If you have never created an OpenGL program, then I suggest that you read my previous article titled “Introduction to OpenGL” here before continuing with this article.
In this article, I will show how to implement projective shadow mapping in OpenGL using Cg shaders.
The basis of this post comes from the article titled [Transformation and Lighting in Cg]. I will assume the reader has a basic understanding of OpenGL and already knows how to setup an application that uses OpenGL. If you require a refresher on setting up an application using OpenGL, you can refer to my previous article titled [Introduction to OpenGL for Game Programmers].