Is it right that rendering has not been optimized at all, using vertex buffers and stuff like that, but that it has been left pretty much in the original state, apart from finally calling OpenGL to render primitives? It looks like a model is rendered face by face, setting up everything as required for that face.
The entire code looks like being pretty much in the original state and just having had the file extensions changed from .c to .cpp.
Can that be?
Edit:
I just found the code where particles are emitted from ship thrusters if the afterburner is on. The thruster renderer explicit calls the particle emitter during each render pass, telling it how many particles to emit to which direction ... there is no encapsulation of that functionality, not even on file base. That's horrible.
In D2X-XL you simply create an emitter, tell it the desired smoke density (which translates into particles per second), and all you have to do is to update its position and direction every frame and then tell it to update itself ... it will then create new particles and shove them over to the transparency renderer which takes care of all transparent stuff.
D2X-XL's model renderer sorts all faces by properties and then renders all faces with identical properties in one batch, using OpenGL transformation, hardware lighting and vertex buffer objects. Once the VBO is loaded there never has any render data to be sent to OpenGL except for texture handles, buffer indices and lengths. I have completely abandoned the face by face lighting and rendering code quite a while ago.
Sorry for being so straight forward, but: What did you do with the FS2 source code in all the years you had it? I had expected significant optimizations using OpenGL having been done already. I have to say that my first impression from poking around in the code leaves me a bit surprised and rather disappointed.