Irritant wrote:reckless wrote:still darkplaces does it quite well with the media at hand but quake was newer ment to run like that.
DP has md5 support(or at least comparable formats), and can run q3bsp maps(maybe others too?). So I don't think that DP is hampered by being limited to Q1 content, so a reasonably accurate comparison can certainly be made.
The reason I suggest the DP might run faster is that DP incorporates some more modern rendering techniques that what Carmack may have been using back in 2002-2003(I'll wait to actually see the code to know for sure).
I've run Doom 3 through GLIntercept and had a peek at what it does behind the scenes. Everything is really quite up to date, with the only really old thing it uses being asm shaders. Otherwise it's almost all VBOs (there are some standard vertex arrays too) with glDrawElements. It does use 32-bit indexes which would punt older hardware back to software emulation in that part of the pipeline, but so does DP so that one's nill-all. It also uses a normalization cubemap, whereas nowadays you'd do that in shader code. But that's much of a muchness, and the cubemap may even be faster on some hardware.
That aside, there's no immediate mode in there at all. It's renderer first unbinds all buffers, then goes through an initial pass of updating all dynamic VBOs that will be used that frame (via glBuffer(Sub)Data, not glMapBuffer), then clears and does some initial setup, and finally does batches of glLoadMatrixf/state setting/glDrawElements.
A typical draw batch is:
Code: Select all
glLoadMatrixf([1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000,0.000000,0.000000,0.000000,0.000000,1.000000])
glProgramEnvParameter4fvARB(GL_VERTEX_PROGRAM_ARB,5,[0.000000,0.000000,0.000000,1.000000])
glProgramEnvParameter4fvARB(GL_VERTEX_PROGRAM_ARB,6,[0.000000,0.000000,0.000000,0.000000])
glProgramEnvParameter4fvARB(GL_VERTEX_PROGRAM_ARB,7,[0.000000,0.000000,0.000000,0.000000])
glProgramEnvParameter4fvARB(GL_VERTEX_PROGRAM_ARB,8,[0.000000,0.000000,0.000000,0.000000])
glBindBufferARB(GL_ARRAY_BUFFER,1024)
glVertexPointer(3,GL_FLOAT,60,0x1d010)
glTexCoordPointer(2,GL_FLOAT,60,0x1d01c)
glColor4fv([1.000000,0.000000,0.000000,1.000000])
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER,0)
glDrawElements(GL_TRIANGLES,198,GL_UNSIGNED_INT,0xea2f370)