[self-interest] OpenGL

Steve Dekorte steve at dekorte.com
Mon Jun 16 02:48:52 UTC 2003

On Friday, June 13, 2003, at 07:27 PM, Jecel Assumpcao Jr wrote:
> On Wed, 11 Jun 2003 19:18:33 -0700, Steve Dekorte wrote:
>> The characters are rendered from a texture, so you could certainly
>> render them onto a surface if you wanted to. Either way, you get
>> excellent performance because you keep the data close to the logic and
>> let the graphics hw do the heavy lifting.
> Ok. OpenGL is an immediate mode renderer, right? This wouldn't be as
> easy in a retained mode one.

I'm not sure what you mean. If you mean you want to keep a copy of a 
frame buffer and draw over it, you can do that in-hardware using OpenGL 

Maybe it's best to put this to a test. This test isn't perfect, but 
it's simple and might be useful for ball-park figure comparisons. 
Here's a sample program:


It's set up to draw 15000 polygons and then swap the buffers. It 
measures the performance about once per second. Here are the results on 
my year-old OSX box:

[max:~] steve% ./a.out
polygons per second = 911764, frames per second = 62
polygons per second = 1014705, frames per second = 69
polygons per second = 980198, frames per second = 66
polygons per second = 1014705, frames per second = 69
polygons per second = 1009900, frames per second = 68
polygons per second = 950495, frames per second = 64
polygons per second = 980198, frames per second = 66

So about a million smooth shaded 24bit color polygons per second. I 
would guess that performance on texture mapped polygons (such as text) 
wouldn't be much different and would more dramatically illustrate the 
performance difference, but I wanted to keep this test simple.

Can someone put together a similar Xlib/Linux or CoreGraphics/OSX demo 
to compare this to?

Io, a small language: http://www.iolanguage.com/

More information about the Self-interest mailing list