I haven’t clogged this forum with questions in several months now, as I’ve been too busy to work on my 3d game. But now I’m back (sorry?) so here goes: I realize by talking with experienced game programmers that I’m getting roughly 1% of the possible frame rate I could get, by using display lists but no vertex or index buffers and storing all texture and rendering data in software. Can anyone possibly post me an entire small program (JOGL, preferably) that fully utilizes every possible hardware option to render textured polygons? I just want to know the absolute fastest way to render polygons. I read about VBOs, are they supported in JOGL? I’m hoping to be able to render several hundred thousand textured polygons per frame, with huge amounts of screen overdraw, and still get 60-100 fps, is this possible if I use every possible hardware option? If so can I see a program example? Thanks a lot everyone.
Hi,
as always with performance questions, the first answer is: it depends.
Whether you’ll be able to get several hundred thousand polys with 60-100 fps, is first off all a question of your graphics card.
when playing around with terrain-rendering, I was able to render a 512x512 heightfield (so about half a million triangles, no strips) using texture-splatting with two passes with about 80 fps on a Radeon 9800.
So basically, yes, it should be possible. Nevertheless, drawing about 100.000 textured fullscreen-quads will probably kill your framerate.
Concerning what technique to use, in my experience displaylists on newer (eg. Radeon 8500 and up) ATI hardware are quite slow. I guess, they are only implemented because the spec requires it, but nothing more.
In general, VBO’s are the way to go especially if you have static geometry that can stay on the graphics-card, which appears to be the case with your problem, as you mentioned display lists.
And yes, they are supported by JoGL. It’s actually pretty easy to use. There’s a VBO whitepaper at developer.nvidia.com, which explains how to use them pretty well (of course, you have to use ByteBuffers instead of arrays, but a look at the jogl-demos with vbo should get you started).
Cheers,
Jan