As mentioned last week, the ARB draw_instanced extension allows you to draw large numbers of the same basic geometric shape with a single rendering call. However, to be useful, you need to pass in per-instance parameters which are used to customize the rendering. With the ARB uniform_buffer_object extension, you can get up to ~200-300 objects before running into memory-allocation failures.
With the ARB texture_buffer_object, by comparison, you can go far higher. My current test is rendering 15,000 textured, medium-quality (224 triangles each), per-pixel-lit, spheres at approximately 200fps on my old laptop.
This would seem to answer the question that comes up once in a while from the scientific visualization folks; "what is the fastest way to render a bleep-load of spheres from PyOpenGL". While I can think of a few ways that might come out faster using e.g. point-sprites and faked geometry, this is a pretty straightforward way to get enough of a boost not to care any more.
 That's a little misleading, however, as at this kind of load the "smooth" camera platform becomes jumpy and makes it look pretty blah, even though the individual frames are rendering very fast. That might just be a problem with sync, or maybe with the code that tries to smooth out the animations.
Pingbacks are closed.