I've been trying to track down the source of a rather strange
problem in my OpenGL application. I have a window, containing an
OpenGL surface, and I cover that window entirely with other windows,
the system becomes rather "sluggish" (window dragging is glitchy,
etc). At first I thought it was my application, but I've noticed the
exact same symptoms in certain GL based games (StepMania, Quake 3
Arena) but not in others (UT2004 Demo, Halo Demo).
If I open GL Driver Monitor and watch the graph, "CPU Wait for Free
OpenGL Command Buffer" spikes immediately to its maximum value, while
"CPU Wait for OpenGL Swap to Complete" becomes very erratic, jumping
constantly between its maximum and minimum values. I'm not sure what
this means, and also if it means anything at all, but the graph is
relatively smooth until I cover the surface and then there are
massive spikes while the surface is covered. CPU Usage, via Activity
Monitor _falls_ slightly during the period when the window is covered.
An image of the GL Driver Monitor showing the spikes is here: http://
Where the graph is smooth, the window and its surface are exposed,
the spikes are where the surface is covered.
I first noticed this issue while trying to use thread_policy_set()
to make my rendering thread have a time constraint policy. It would
work fine until I covered the surface, which would immediately cause
the entire window server to "freeze" (the mouse would still move, and
iTunes was still playing in the background, so it wasn't a crash).
Getting rid of the call to thread_policy_set() prevented the system
from "freezing" but I then noticed the glitchy window dragging, etc.
Thinking it was probably something to do with the threading, I moved
my rendering loop into main() — nothing changed.
My setup code:
Rect r; SetRect( &r, 100, 100, 740, 580 );
kWindowStandardDocumentAttributes, &r, &this->testWindow );
As you can see, fairly simple. The rendering function is called as
fast as it can.
This is on 10.4.3 on an iBook G4 with a Mobility Radeon 9200.
Testing this on my iBook G3 (Mobility Radeon 7500) running 10.3.9 the
effects are worse: While the application is running, any window
movement is glitchy as hell.
Please tell me I'm doing something wrong,
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden