Tutorials
OpenGL News / Downloads / OpenGL / Rage3D / Tutorials / Photos / Links / Contact Me / About / Forum
Chapter 1-2     Chapter 3-4    Chapter 5-7      Chapter 8-13


I have had numerous queries about people wanting to learn OpenGL. Because of this I decided to add these tutorials to site.

All the tutorials below draw heavily on the examples given in the "OpenGL Programming Guide", also known as the Redbook.I suggest that you get a copy of this book

Authors: Jackie Neider, Tom Davis, and Mason Woo
ISBN: 0-201-63274-8
As far as I remember the Publisher is Addison-Wesley Publishing

I have tried to comment these tutorials as thoroughly as possible, but if you still have queries about this you can mail me here



 Ads


CHAPTER 1 Introduction to OpenGL


A Simple OpenGL Application (example 1.1) 29 October 2003
Description :   This program shows how to draw a white rectangle on the screen, it also shows how double buffering works.

This tutorial is the same as example 1.1 in the Redbook

Example 1.2 will not be here, because we wont be using the auxilary library.
Download :  16 KB (EXE and Source)
Perma Link: Simple opengl application


A Double-Buffered Program (example 1.3) 29 October 2003
Description :

  This is basically just a continuation on the previous tutorial.

All that is being shown here is how to achieve animation using Double-Buffering.

On Windows Systems, this call is a Standard GDI API function called SwapBuffers.

 

Download :  16 KB (EXE and Source)
Perma Link: Double-buffered program

CHAPTER 2 Drawing Geometric Objects

Debth Buffer And Hidden Surface Removal (example 2.0.1) 29 October 2003
Description :

  You will not find this tutorial in the Redbook.

While I was reading through the book, I found that this would have been a nice example to add in there.

So here it is.

This tutorial shows how to setup The Depth Buffer and how to do Hidden Surface Removal.

 

Download :  17 KB (EXE and Source)
Perma Link: Debth buffer and hidden surface removal


OpenGL Primitives (example 2.1a) 30 October 2003
Description :

  You will not find this tutorial in the Redbook.

I created another tutorial that would have been nice to see in the Redbook, so i added this too

This tutorial shows how to Draw All of the primitives that the OpenGL API supports.

Use "K" to scroll through each one.

 

Download :  20 KB (EXE and Source)
Perma Link: OpenGL primitives


Using Line Stipple Patterns (example 2.1b) 30 October 2003
Description :

  This is example 2.1 in the Redbook.

I shows how to do different types of line stippling in OpenGL.

Download :  17 KB (EXE and Source)
Perma Link: Using line stipple patterns


 Using Polygon Stipple Patterns (example 2.2) 30 October 2003
Description :

  This shows how to create Polygon stipple patterns.

Each polygon has its own pattern defined.

The comments in the code explains exactly how it works

Download :  17 KB (EXE and Source)
Perma Link: Using polygon stipple patterns


 Marking Polygon Boundary Edges (example 2.3) 01 November 2003
Description :

  This uses glEdgeFlag to mark any of the edges on any polygon.

To Enable an edge set the glEdgeFlag to GL_TRUE before drawing the Vertex.
To Disable viewing any ebge set it to GL_FALSE.

Download :  16 KB (EXE and Source)
Perma Link: Marking polygon boundary edges


 Drawing an Icosahedron [ 20 sided sphere ] (example 2.4) 01 November 2003
Description :

  Here we draw a 20 sided sphere.

Read this chapter very carefully because it is easy to get lost.

I have made each triangle a different colour, so that each one is visible, and used the glRotate function so we can see al the sides of the Icosahedron.

Download :  17 KB (EXE and Source)
Perma Link: Drawing an icosahedron


 Supplying Normals for an Icosahedron (example 2.5 and 2.6) 01 November 2003
Description :

  Here we draw the same 20 sided sphere, but now we add normals to it.

A normal, in short, defines the direction a specific polygon or vertex is pointing. It is used often when working with Lighting.

We also use GL_LIGHTING for the first time.
Do not worry about this for the moment, it will be explained in a later chapter.

Download :   18 KB (EXE and Source)
Perma Link: Supplying normals for an icosahedron


 Subdividing to Improve a Polygonal Approximation to a Surface (example 2.7) 01 November 2003
Description :

  Here we draw the same sphere, but now we subdivide each of the 20 polygons to get a better looking sphere.

Thanx Scott for helping me with the strange issues on the subdivision

Download :  18 KB (EXE and Source)
Perma Link: Subdividing to improve polygonal approximation of a surface


 Recursive Subdivision (example 2.8) 01 November 2003
Description :

  In this tutorial we subdivide the sphere recursively to a depth that we define.

You can use "A" and "S" to increase and decrease the depth of the subdivision and "K" to toggle Smooth/Flat shading

Download :  18 KB (EXE and Source)
Perma Link: Recursive subdivision


Chapter 1-2     Chapter 3-4    Chapter 5-7      Chapter 8-13


 Ads