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


 Ads


CHAPTER 5 Color 

 Drawing a Smooth-Shaded Triangle (example 5.1) 12 November 2003
Description :

 This is a fairly standard tutorial showing how to create a smooth-shaded triangle.

Each vertex has its own colour, and the triangles colour gets shaded/ interpolated between adjacent vertices.

Download :   16 KB (EXE and Source)
Perma Link: Drawing a smooth-shaded triangle

CHAPTER 6 Lighting and Materials 

 Drawing a Lit Sphere (example 6.1) 12 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology To create this sphere I used the trusty old Quadric object again. but this time I also generated Normals for the sphere.

Next I set the material of the sphere (Specular Highlighting and Shininess)

And set the light position and enabled it.

Download :   17 KB (EXE and Source)
Perma Link: Drawing a lit sphere


 Drawing a Lit Sphere With Coloured Light (example 6.1b) 12 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology This is a modification on the previous tutorial.

In this OpenGL Tutorial I added coloured Ambient, Diffuse and Specular light.

Everything else stays exactly the same

Download :   17 KB (EXE and Source)
Perma Link: Drawing a lit sphere with coloured light


 Drawing a Lit Torus With A Rotating Light (example 6.1d) 12 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology Here we are drawing a Torus (Doughnut) with one Blue light enabled.

It uses similar materials as the sphere we drew int the previous example.

Because we are not using the aux or glut libraries I added a function to create a torus in a Display List.

The function is called CreateTorus (As if you wouldn't have guessed).

Download :   18 KB (EXE and Source)
Perma Link: Drawing a lit torus with a rotating light


 Drawing a Rotating Lit Torus With Rotating Light (example 6.1e) 12 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology I was getting bored with all the tutorials so I decided to modify example 6.1d and add another light source with different light properties.

This was the end result.

Download :   18 KB (EXE and Source)
Perma Link: Drawing a rotating lit torus with rotating light 


 Moving a Light with Modeling Transformations (example 6.2) 13 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology  In this tutorial we rotate a light ( Shown as a cube) around a stationary torus.

I have rotated the scene 45 degrees to show a better angle for the lighting.

You can use your left mouse button to rotate the light

Download :   18 KB (EXE and Source)
Perma Link: Moving a light with modeling transformations


 Using Different Material Properties (example 6.3) 13 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology This tutorial was developed to show different material properties, and how to use them efficiently.

You will notice that you do not have to call glMaterialfv every time you draw an object.

This call holds its state until another call to the same material property is made.

Download :   17 KB (EXE and Source)
Perma Link: Using different material properties


 Using glColorMaterial() (example 6.4) 13 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology In this tutorial you can use your mouse buttons to change the Diffuse Material properties of the sphere.

Use your left mouse button to change the red component.
Use your middle mouse button to change the green component.
And use your right mouse button to change the blue component.

Download :   18 KB (EXE and Source)
Perma Link: Using glColorMaterial()

CHAPTER 7 Blending, Antialiasing, and Fog

 A Blending Example (example 7.1) 13 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology Here we use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);  and 0.75 as the alpha value on all the colours

I have changed the colours because the original colour scheme, was hurting my eyes.

Download :   18 KB (EXE and Source)
Perma Link: Blending example


 Three-Dimensional Blending (example 7.2) 13 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology This tutorial is slightly different from the one in the book, but shows the same principles.

Download :   19 KB (EXE and Source)
Perma Link: Three-dimensional blending


 Anti-aliased Wireframe Icosahedron (example 7.3) 13 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology Here we show a spinning anti-aliased Icosahedron.

All the code for the anti-aliasing can be found in the glInit procedure.

I am having problems getting the correct behavior from example 7.5 (Anti-aliasing Filled Polygons) so I will post it later.

Download :   17 KB (EXE and Source)
Perma Link: Anti-aliased wireframe Icosahedron


 Five Fogged Cubes in RGBA Mode (example 7.6) 17 November 2003
Description :

Delphi courses learning tutor OpenGL 3D Development Information Technology This is an example of how to implement the three different types of fog.

In the original example they use Teapots, but because we dont use the aux or glut library ( wich generate these atomatically), I used Cubes.

Use you left mouse button to toggle between the three Fog Modes.

Download :   18 KB (EXE and Source)
Perma Link: Five fogged cubes in RGBA mode


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


 Ads