Hey everyone,
I recently turned in my university project in programming, and since it’s unfinished but working on it was heaps and loads of fun, I’ll be finishing it in my free time.
Thing is, while the game runs great on NVIDIA GPUs, it struggles to get a two-digit framerate value on ATI hardware - values in the range 1-5 are quite common; it’s a tiny bit better with the latest Radeon generation, but certainly the complexity of the graphics does not justify the poor performance.
Unfortunately, I don’t have access to an ATI-equipped system for a period of time long enough or with the tools to properly debug the game. I was hoping maybe someone could point me in the direction of a solution?
I suspect the problem lies in the performance of glDrawElements - the game uses the GLSL pseudo-instancing technique (as described in the NVIDIA paper here) and may be making dozens of thousands of glDrawElements calls per frame. While NVIDIA explicitly states that this function is very efficient on their hardware, there might be something in ATI’s implementation (VBO locking or something, I don’t know) that causes a dramatic slowdown. Any hints?
Of course I’m rendering geometry out of a STATIC_DRAW VBO, with a very simple programmable pipeline. The problem also existed, however, when I was using the fixed pipeline and the matrix stack, and the switch to instancing greatly improved performance on NVIDIA hardware.
The game can be downloaded here:
http://www.sourceforge.net/projects/ac130
Thanks in advance for any help.