3D rendering engine source code for delphi

Written by Peter Bone

http://www.geocities.com/peter_bone_uk

23 / 3 / 2005


This source code demonstrates the techniques used to handle 3D graphics from scratch - without using an API such as OpenGL. The code includes Gouraud and Phong shading, which gives much better quality than flat shading for curved surfaces. Also included are methods for building general 3D shapes. The code does not yet include texture mapping. Some things that it can do are:

build models
wire-frame rendering
lighting
flat shading
gouraud shading
phong shading
backface culling
perspective projection
world space to view space transformation
camera movement
frustum culling
super-sampling

There is a delphi project included to demostrate how to use the rendering engine. The controls for the demo are:

move mouse         - change viewing angle
left mouse button  - move forward
right mouse button - move back
arrow keys         - move up, down, left and right
Esc                - exit program
g                  - change to Gouraud shading
f                  - change to flat shading
p                  - change to Phong shading
w                  - change to wire frame rendering
0                  - no super-sampling
1                  - 2x2 super-sampling 
2                  - 4x4 super-sampling
3                  - 8x8 super-sampling 

