Thursday, December 11, 2008

Fixed it!

Hopefully! ;)

CreateDevice needs D3DCREATE_FPU_PRESERVE; this is actually a fairly well documented "feature", whereby Direct 3D defaults to a low precision FPU mode ("to enhance performance") unless this flag is specified. Unfortunately, it plays unholy havoc with Quake's internal timers.

Other news - just restructuring the surface Vertex Buffer code a little, I've been reading up on simultaneous data streams for them, and it seems like I can drop most of the old BuildSurfaceDisplayList function, and create a number of streams. I like the flexibility this gives me, as it lets me lock and unlock individual streams, and store all of my static geometry on the hardware with quite a main memory saving. I know you can do it with OpenGL VBOs, but the API for that is horrid.

I'm going to do lightmaps as 128 bit textures! I've been experimenting with them a little, and it means that I can keep the lightmap granularity but still use 2x overbrighting (or even 4x overbrighting) to get a good look on it.

0 comments: