In this article I will introduce the reader to the OpenGL rendering API (application programming interface). I will also introduce GLSL (OpenGL Shading Language). We will create a simple vertex shader and fragment shader that can be used to render very basic 3D primitives. By the end of this article you will know how to create a simple OpenGL application and render 3D objects using shaders.
In this article I will demonstrate one possible way to generate multi-textured terrain using only the OpenGL rendering pipeline. This demo uses the GL_ARB_multitexture and GL_ARB_texture_env_combine OpenGL extensions to do the multi-textured blending based on the height of the vertex in the terrain. I will also use the GL_ARB_vertex_buffer_object extension to store the terrain’s vertex information in the GPU memory for optimized rendering.
I will not show how to setup an application that uses OpenGL. If you would like to review how to setup an OpenGL application you can refer to my previous article titled “Introduction to OpenGL for Game Programmers“.
In this article, I will show how you can load and animate models loaded from the MD5 model file format. In this article I will use OpenGL to render the models. I will not show how to setup an OpenGL application in this article. If you need to get a quick introduction on setting up an OpenGVL application, you can follow the “Beginning OpenGL for Game Programmers” article [here].
In this article I will demonstrate a basic introduction in OpenGL. It will be in tutorial format that the reader can follow along on their own. The final result should be a working template that can be used to create your own projects using OpenGL.