Hi WhiteHexagon,
I was skeptical of the numbers you posted, so I created a little test to try the different methods. Here it is (requires Java 5.0+, LWJGL, GL1.3+, GL2.0 for the final test):
Bricks Test (439kb zip, includes source & win32 LWJGL binaries)
The test renders 18x18x18 “bricks” (6 QUADS, normals are specified but with no lighting or texturing). I assumed as a requirement that each brick is dynamic in position and appearance, so I’m rendering a total of 5832 unique bricks, while constantly animating their position and color.
There are 3 tests currently (press SPACE to change the active test):
- Immediate mode rendering. Uses glTranslate and glBegin(GL_QUADS).
- Simple display list rendering. Uses glTranslate and glCallList.
- Display list rendering with pseudo-instancing. Uses a vertex shader to pass the brick position as a texture coordinate and glCallList.
I didn’t have time to add a vertex array test, feel free to add one.
So, here are my results:
WinXP, Athlon XP 2800+, GeForce 6800GT AGP, Java 6 b90
Client VM Server VM
------------- -------------
- IM 52 fps 65 fps
- DL 155 fps 170 fps
- PI 253 fps 253 fps