OpenGL Projects
OpenGL News / Downloads / OpenGL / Rage3D / Photos / Tutorials / Links / Contact Me / About / Forum
OpenGL I      OpenGL II      OpenGL III      OpenGL IV      OpenGL V


Here are some of the OpenGL projects that I have been working on. Source code is included. All the projects have been created using Delphi and OpenGL, but that should not stop any C or other programmers, because OpenGL is the same in any language. (Remember that you need a 3D card to get opengl working on your machine.)
I have tried to make the code compatible for all versions of Delphi. If it does not work in your version, please let me know.


 Ads


Tangent Bumpmapping using nVidia's Cg 21 December 2004
Description :

Tangent Bumpmap,Dynamic Cube Mapping,GL_TEXTURE_CUBE_MAP ,Redbook Tutorials,3D, OpenGL, Tutorials, Borland Delphi,Forum,Bulletin Board.
This project shows how to use Cg to implement Tangent Space Bump mapping on models.

The current version only handles Quads, but with a little sweat, you can easily Generate the right matrices for Triangles also.

The original c++ version done by Søren Dreijer (Halloko) can be found at http://www.blacksmith-studios.dk. Thanx for all your help dude :)

This Code also uses the VectorGeometry.pas unit from glscene.org

Please note: I have included all the relevant units, and dll's, but its always a good idea to look at the originating sites to get the latest versions

Download :   1,768 KB (EXE and Source)
Perma Link: Tangent Bumpmapping using nVidia's Cg


Dynamic Cube Mapping 26 July 2004
Description :

Cube Mapping, Cube Environment Mapping, Environment Mapping
SibVRV has informed me that he has modified the cubemapping demo to now use dynamic cubemaps.

You will need quite a high end card to get a decent framerate on this, because the scene has to be rendered 7 times.

Download :   432 KB (EXE and Source)
Perma Link: Dynamic cube mapping


Cube Mapping Demo 24 June 2004
Description :

Cube Mapping, Cube Environment Mapping, Environment Mapping
I modified the texture loader, to accept a Texture Target constant.
This enables the the use of cubemaps using the sulaco 1.5 template.

I have used the GL_TEXTURE_CUBE_MAP_EXT, but to use GL_TEXTURE_CUBE_MAP_ARB would be exactly the same.
Just change the constants where needed.

Download :   388 KB (EXE and Source)
Perma Link: Cube mapping demo


Multiple levels of detail on Textures 18 May 2004
Description :

Bi-linear,Tri-linear,Sin wave,3D studio max, Model editor, Environment Mapping
Luuk "Seriva" van Venrooij has sent me a tutorial on Texture detail.

It shows how to implement Bi-linear and Tri-linear filtering, and also has 5 levels of detail on the loaded texture.

Use F1 to F5 for different LOD's on the texture.

Download :   330 KB (EXE and Source)
Perma Link: Multiple levels of detail on textures


Sinusoidal Scrolling (Sine Wave Spline Text) 25 February 2004
Description :

Sin wave,3D studio max, Model editor, Environment MappingPhilippe Dargent has sent me this code showing how to create several different sine wave scrolling effects.
This Project is a modification on his previous project called Enabling / Disabling V-Sync (Vertical Synchronization)

Use X, Y, Z, 1, 2, 3 and 4 to see different versions of the spline animation.

Download :   377 KB (EXE and Source)
Perma Link: Sinusoidal scrolling


Volition - Nehe Creative Demo Contest 2003 20 February 2004
Description :
Volition Nehe Creative Demo,3D studio max, Model editor, Environment Mapping

The Nehe Creative Demo Contest has finally ended, and most of the demos are online.

The entry sizes range from 250 Kb to about 22 Mg :eek: and there is something to learn in all of them

To go directly to the contest page click here.

You can download my entry called Volition here, or on the contest page.

All the music was done by a good friend of mine at Mystic Sound Theatre

Download :   5.5 Mb (Source)
  5.5 Mb (EXE)
Perma Link: Volition - Nehe Creative Demo Contest 2003


Enabling / Disabling V-Sync (Vertical Synchronization) 03 February 2004
Description :

Experiment in Texturing,3D studio max, Model editor, Environment MappingPhilippe Dargent Sent me this brilliant piece of code showing how to Enable or Disable v-sync in OpenGL.

With V-sync Disabled I get approx. 240 FPS on my Geforce MX 440.

There are a few drawbacks to disabling V-sync.
You can read about these here

Download :   467 KB (EXE and Source)
Perma Link: Enabling / Disabling V-Sync (Vertical Synchronization)

An Experiment in Texturing 05 December 2003
Description : Experiment in Texturing,3D studio max, Model editor, Environment MappingI got an idea to use multi-texturing and the texture matrix to do some cool effects. This was the end result.

Please note that this Project uses the dglOpenGL.pas unit from www.delphigl.com
Download :   356 KB (EXE and Source)
Perma Link: An Experiment in Texturing

3DS file loading (Extended) 20 November 2003
Description : 3D studio max, Model editor, Environment MappingJuanjo sent me 7 projects, showing how to load and manipulate 3DS files. 

The seven projects are:
 SimpleLoad (Basic 3DS loader)
 RotateScene (Rotation of the scene)
 EnviromentMap (Duh)
 Picking (Selecting objects in the scene)
 ChangeColor (Change the colour of each object individually)
 ContextualMenu (Right click menu on each of the three objects in the scene)
 Transformation (Moving the objects seperately)

Download :  1.15 MB (Source)
Perma Link: 3DS file loading

2D Boids (Flocking / Schooling) 14 October 2003
Description : This project shows how to create schooling behavior in fish.
Same species try to stay together and fend of other species.

Each species has their own set of attributes (Max Speed, Min Speed, etc...) and therefore behave differently to the others.

I have included a setup screen, so if your card does not support Multi Texturing or you have a low FPS, you can disable Multi Texturing or reduce the Polycount.

Use "L" to Toggle lines to friends.
Use "K" to Toggle lines to enemies.
Download : 645 KB (EXE and Source)
Perma Link: 2D Boids (Flocking / Schooling)

3D Font Tutorial 08 October 2003
Description : Arno van der Vegt Has sent me a small project about creating 3D fonts in OpenGL.

Thanks dude :)

As usual the sourcecode and binary is included.

Download : 80 KB (EXE and Source)
Perma Link: 3D font tutorial

Milkshape 3D Character Animation 22 July 2003
Description : Skeletal Character animation using Keyframe interpolation and Milkshape 3D ASCII files

Version one only handles one animation sequence.
I am currently working on a way of rendering multiple animations on the same character.
I will post a new version once this is done.

Arrow Keys to rotate.
Page Up / Down To Zoom.
s to toggle bones.
Download : 451 KB (EXE and Source)
Perma Link: Milkshape 3D character animation

ODE physics 12 June 2003
Description : Jon Walton from carsetcreator.grandprix-x.com has sent me this exellent bit of code, Basically showing ODE Physics, applied to race cars.

This code is based on Mattias Fagerlund's ODE demo's

To move the car, just use your cursor keys,
If you flip the car, use x to get it back on its wheels.
Download : 763 KB (EXE and Source)
Perma Link: ODE physics

Non Standard Fonts 22 May 2003
Description : This project renders non standard "fonts" / text in OpenGL.
It is very useful in something like the credits page of your demo
(If you want to use a font that you created yourself).

Creating the texture can get a bit tricky, but if you remember that each character must have a width 28 Pixels and a one pixel border, you shouldn't have any issues.
Download : 224 KB (EXE and Source)
Perma Link: Non standard fonts

GL Picking 16 May 2003
Description :
David Caouette sent me his Delphi port of glPicking originally done by Digiben

I searched Jan's archives and came up with another implementation of the above.

I urge you to download both and look at the different solutions for the same problem.

Download : 32 KB (EXE and Source)
Download : 433 KB (EXE and Source)(David Caouette)
Perma Link: GL Picking

Bounce Water 29 October 2002
Description : A lot of people asked me, "So how do i put it all together?"

I have taken some of the other tutorials and created this piece of eye candy.

It uses slightly modified versions of the Bouncing Ball and Water Ripple tutorials.
Download : 144 KB (EXE and Source)
Perma Link: Bounce Water

Pixel shader for geforce 1 and up 16 September 2002
Description : This Pixel shader tutorial was created by Cheb,
using Jan Horn's Delphi OpenGL template
and the CyberDemon's C++ example program from GameDev.ru

Keys: Space switches shiny mode,
Enter switches lighting mode,
"A": slower,
"S" faster.

(Note: you need a geforce one or higher to run this demo)

This tutorial now also has a gloss map effect (see Ver 2)

For information on Register Combiners you can go to nVidia's website.
You will need acrobat reader to view this document.
Download : 208 KB (EXE and Source)(Ver 2)
Download : 181 KB (EXE and Source)(Ver 1)
Download : 460 KB (PDF Register Combiners Documentation)
Perma Link: Pixel shader for geforce 1 and up

Line - Polygon Collision Detection 26 August 2002
Description : This project basically shows how to do Line Polygon collision detection.
Use Up, Down, Left, Right, 1 and 3 to move the line around.

The quad will become red when the line intersects the polygon.

You can find the original c++ code written by Digiben at www.gametutorials.com
Download : 164 KB (EXE and Source)
Perma Link: Line - Polygon Collision Detection

Simple Light Generation using Blending 4 July 2002
Description : Here is a simple application to create the illusion of light falling on objects.
In this implementation it looks like you are shining a flashlight into the room.

Use your arrow keys to move the light beam and B to toggle the rooms light.
Download : 216 KB (EXE and Source)
Perma Link: Simple light generation using blending

Loading Quake 3 BSP files 3 June 2002
Description : Here is a simple application to load and display Quake 3 maps. I say simple because at this stage lightmaps, POV, collision detection has not yet been implemented. This application is based on the BSP tutorial www.gametutorials.com

Use your arrow keys and mouse to move around the scene. "W" toggles wireframe mode on and off.
Download : 124 KB (EXE and Source)
Perma Link: Loading Quake 3 BSP files

Projected Textures 20 May 2002
Description : This project uses two passes to generate the scene. The first pass creates the room with the object. The second pass creates the projected texture on the objects and blends it with the first pass.

You can press space to stop the animation in the scene. Click on and drag the sphere around the scene to see how the projected texture wraps around the sphere.
Download : 130 KB (EXE and Source)
Perma Link: Projected textures

Projected Shadows 5 May 2002
Description : A simple demo to show how to do projected shadows in a scene. This demo has one light source and two rotating objects. A shadow is cast on the walls behind the objects depending on the position of the light source.

Adding more light sources and more objects to the scene requires very little extra code.

When the demo starts you will notice the light moving around the scene by itself. To control the light, click on it and drag it around the scene. To move the light source into and out of the scene use a right click drag.
Download : 115 KB (EXE and Source)
Perma Link: Projected shadows

Transparent TGA files and Fog 30 April 2002
Description : This example on the right is used to demonstrate the use of the transparent TGA files. By transparent TGA files I mean 32bit TGA files that have a alpha mask included in the file. These images can be used to create complex looking objects while they are only drawn on a single quad. eg. Trees and fences

In the screenshot on the right I used only 7 quads to create the metal object.

This example also demos the use of fog in a scene.
Download : 95 KB (EXE and Source)
Perma Link: Transparent TGA files and Fog

Particle Lines 15 April 2002
Description : I once saw a similar effect in a demo and thought I would try and create this effect.
There are a bunch of particles moving around the screen randomly, but in a general grid structure. These particles leaving thin blue trails behind them. The faster particles leave red trails.

Keys : Keypad + and - to add or remove particles.
Press "B" to toggle the background on and off.
Download : 40 KB (EXE and Source)
Perma Link: Particle lines

Bumpmapping 10 April 2002
Description : This is a simple technique for doing bumpmapping with a movable light source. It is not true bumpmapping, but it is a good looking and not very CPU intensive technique.
Move your mouse around the scene to see how the light affects the bumpmapping.

Press Space to toggle the textured image on and off.
Keypad + and - to change the amount of bumpmapping.
Download : 76 KB (EXE and Source)
Perma Link: Bumpmapping

OpenGL ActiveX 1 April 2002
Description : Ever wanted to have OpenGL running in a browser ? Now you can using an ActiveX control and a MS IE browser. The ActiveX control renders the OpenGL scene to itself. This means that you can have an OpenGL scene in a browser that can respond to keystrokes and mouse events. To see how to add those, read the readme.txt in the .zip file.
To see it in action, take a look at this page.

Your browser's security settings might prevent you from downloading the ActiveX controls. Just tell it to prompt you on ActiveX downloads and allow this one to run. It a 171KB download.
Download : 174 KB (ActiveX OCX and Source)
Perma Link: OpenGL ActiveX

Motion Blur 25 March 2002
Description : Here is a simple project that shows you how to do motion blur without using the accumulation buffer. The accumulation buffer is the proper way of doing it, but commercial cards have no hardware support for the accumulation buffer and you end up with 1-2fps on a GeForce card.

This motion blur is done using glCopyToTexImage like the previous two examples. What I do here is to render the scene to a texture and draw that texture behind the new scene, but making it slightly darker, so after about 10 frames there is no sign of it.

Keys : UP and DOWN arrow to change the amount of blur.
Download : 34 KB (EXE and Source)
Perma Link: Motion blur

Render Faces 18 March 2002
Description : This project is very similar to a previous one called Render To Texture. What I tried to demonstrate there was using the glCopyToTexture function to create multiple copies of an object to save CPU time.

In this example the face that gets rendered has 800 triangles. Now I can make 500 copies of it floating all over the screen and blending with each other and still get over 60fps on my celeron 800.

Keys : numeric pad + and - to add remove faces.
Download : 68 KB (EXE and Source)
Perma Link: Render faces

Render to Texture 18 March 2002
Description : This app demonstrates how to render to a texture using the glCopyToTexture function. I have used one of my old projects to create a interesting effect (Blending colors). This is rendered to a viewport and then copied to a texture. The texture is then applied to a cube.

Keys : "T" - changes the texture to one of the other 6 available.
"B" - draws the texture being rendered in the background.
Download : 118 KB (EXE and Source)
Perma Link: Render to texture

Basic 3D Engine 14 March 2002
Description : I have added this basic 3D engine to my site because there has been so many requests from people asking how to create a 3D engine or source for a basic engine. If you have written a 3D engine before you might not find this that usefull.

The engine allows you to use the keyboard and mouse to move around the map. The map is a textfile with the vertex coordinates, faces and textures assigned to the faces.
At this stage there is no collision detection.
Download : 196 KB (EXE and Source)
Perma Link: Basic 3D engine

Internet Textures 5 March 2002
Description : This project uses an http connection to download its textures from the internet. There are two textures are on my site and if you press 1 or 2 it will download the texture and assign it to the object.so is your site up and running yet

After you have pressed 1 or 2 to get a texture, give it a few seconds to establish a connection. Once the connection has been made the textures download in less than a second.

Keys : 1 and 2 to download the two available textures

Download : 121 KB (EXE and Source)
Perma Link: Internet Textures


OpenGL I      OpenGL II      OpenGL III      OpenGL IV      OpenGL V


 Ads




Boat Specs and Watercraft Pictures