[SDL] Windowed OpenGL Performance on OS X

rws_sdl_list at girr.org rws_sdl_list at girr.org
Tue Nov 4 12:45:00 PST 2003


I am trying to get the testgl sample to run at a reasonable framerate on OS X
(10.3). I'm working on an iBook 600 (rage128 pro mobility, 8mb).  I get ~350fps
in fullscreen (perfectly reasonable for a spinning cube), but only ~5fps in
windowed mode, and it maxes out the CPU.

Sampler reports 99.8% of the CPU time is being spent in CGLFlushDrawable().

I don't yet understand enough about SDL's internals to figure out why this is
the case.  My only guesses are that it's actually using the software renderer
even though it reports that it's using the rage128pro driver, or that it is
copying the buffers rather than swapping them...

or even worse, rendering, copying to main memory, compositing via Quartz, then
copying back the framebuffer, which is completley unnecessary.  It should just
be rendering to a surface in the video card and ignoring all compositing (as it
should on a machine without QE).

One other idea is that with the recent 10.3 upgrade, Apple is now doing
compositing in software even on non-QE enabled systems.  I'll probably test this
by putting together a GLUT example tonight and seeing how it performs, or by
placing something transparent on top of the SDL window and seeing if it
composites correctly (it shouldn't).

Has anyone run into this, and perhaps can point me in the right direction?
Richard Schreyer




More information about the SDL mailing list