3D OpenGL Engine

BlitzPlus Forums/BlitzPlus Programming/3D OpenGL Engine

I loaded a cshop map and had 54,000 triangles rendering at 50 fps. That's about what I would expect for not having any rendering optimization (BSP).

Here's some more technical info:

-Meshes are lit with vertex lights. I've actually added another kind of vertex to the mesh structure a light vertex! It gets blended with the light color to get a result to fill in the final color array with. Meshes will be triangles only, unless someone gives me a good reason to do otherwise. See CSG brushes for my reasoning.

Meshes may also be projection-lit or lightmapped. Projection lights are the shadows and caustics that sometimes appear on a character or weapon in UT2003. All lightmapping is done in an external editor (CShop, etc.)

-CSG brushes are used for collision and picking. CSG brushes are lightmapped or decal-lit (Half-Life). Picking may still be performed with a complex mesh, but an invisible surrounding CSG brush is used to optimize the test. CSG brushes are the only kind of geometry that gets collided with. There is NO collision for meshes. CSG brushes are rendered with GL_POLYGON, as opposed to GL_TRIANGLES. CSG brushes are also useful for volumetric fog, occlusion, BSP, lighting, etc.

-I have no immediate ideas for dynamic shadows, but the stencil buffer is always there waiting for anyone who wants to take a crack at it. An easy way to start would be a shadow that just falls to a uniform height on the ground, regardless of the map geometry.


Any thoughts?