Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Screen updates freeze in Carbon GL App [repost]



This is a second post as I am unsure that the first went out.

Thinking more about this, I wonder if it may be because I am altering the
OpenGL context while aglSwapBuffers() is potentially pending? Perhaps a
glFinish() on the context I am about to swap out before I do the swap will
resolved things?

Anyone have any other ideas about what to look at?


Hi Folks,

I have a Carbon App that utilizes multiple agl contexts in one window. Only
one of the contexts is active at any given time.

My primary problem is that occasionally (and with no apparent pattern),
switching between the contexts yields a static image in the window (e.g. the
image of the context that was just switched to; switching to another context
displays the image of that context). Sometimes it will happen every switch,
and sometimes it won't happen over the course of hundreds of switches.

The actual image is being updated approximately 30 times/sec. User
interaction with the window in its "frozen" state works fine, but UI changes
are not reflected on the screen. Please note that the backbuffer image of
the context is actually shown (e.g. the first flush works, but only the
first flush).

The geometry being drawn is very simple and static; it is a single textured
quad that covers the entire window viewport. Texture data is provided with
the accelerated shared textures (texture range, AGP, etc.) from an offscreen
buffer in system memory. The scene is redrawn after the texture has been
updated.

Interestingly, the following actions will "unfreeze" the on-screen image and
allow it to update:

 * Pulling down a menu.
 * Activating another window.
 * Moving the frozen window (note that clicking on the title bar will not
   unfreeze the window -- unless you actually drag it by one pixel).

This happens even if the window is partially covered by a utility window.

Moving the mouse over the Dock with magnification on such that the dock
icons expand over the frozen window does *not* unfreeze the window.

Since the event loop is still running, it is clear that the code is not
hanging up in aglSwapBuffers().

Based upon the fact that, if I swap the contexts while it is stuck the first
image flushed from the context is up-to-date, it seems like the back buffer
is being updated just not flushed/swapped when I call aglSwapBuffers.

Debugging this has been very difficult, since interacting with the machine
(e.g. to switch to a debugger window), unfreezes the symptom.

Any one have any ideas?

TIA,

B.J. Buchalter

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.