Saturday, September 11, 2010

3d stuff so far

So, continuing on the Quest to create the rendering portion of a 3d game engine from scratch in plain C, this is where I am at now:

-Load Targa image files (1, 3, and 4-channel)

-Specify rectangular regions of images to use as sprite
-User-specified coordinate mapping of screen
-rendering sprites using GL hardware acceleration

-Create VBOs and populate with  vertices/texcoords
-Multitexturing (currently alpha-blend from layer to layer:  To do 'fancy stuff', specify a shader.)
-Convert Targa heightfield images into meshes.

-6 DOF Camera control (  up/down, left-right, forward-back, yaw, pitch, roll)

-VBO sharing:  multiple small meshes can reside in the same VBO
-Mesh segmentation:  Large meshes can be broken into multiple VBOs

Next on the list:

Rooms:  A Room is an axis-aligned box populated with meshes for floor,ceiling, walls, and any other static objects.

Portals:  A portal is a 'magic' polygon drawn in a room, that leads to another room.  If a portal is visible, then the room it leads to is drawn.  If a portal is not visible, then the room is ignored.  Portals are key to breaking the world up into small pieces, and to allow the renderer to only render parts of the world that can be seen.

-load GLSL shader files and apply to meshes  (relatively low priority:  Fixed Function pipeline is currently sufficient to proof-of-concept the mesh and scenegraph data structures)