Mailing Lists: Apple Mailing Lists

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

Weird behavior after exiting full screen OpenGL application



I am trying to track down the source of a bug that causes, for lack of a
better word, corruption of my desktop after an application exits. I am
working on porting a VR application development library to use Cocoa for
windows, and the applications I am using for testing are test apps for the
library.

The bug occurs when I do full screen rendering. If I open an OpenGL window
full screen, everything is fine until I exit the application. At that point,
the desktop turns black temporarily, and then parts of it get refreshed as I
interact with the desktop. Using Expose refreshes the entire desktop. The
effect can be seen here:

   http://www.137.org/patrick/fullscreen_exit_bug.png

This only happens if a window is opened full screen, and it only happens
after the application exits--or possibly during the exit process. If I close
the OpenGL window while the application is still running, everything looks
fine until I exit the application.

I open a full screen window using the basic procedure described in the
OpenGL Programming Guide for Mac OS X in the section titled "Using Cocoa to
Create a Full-Screen Context". Additionally, I make calls to
CGDisplayCapture() and CGDisplayRelease() at the appropriate times. I saw in
a post yesterday that using SetSystemUIMode() is preferred over capturing
the display, but I am not creating a kiosk.

A detail that may be important here is that the OpenGL rendering in the
software I am working on occurs in a spawned thread. By the time the
application exits, the OpenGL context has been closed, the thread exited,
and the auto-release pool for the thread destroyed. I don't know if this is
a factor, but it is something different than the examples I have been reviewing.

 -Patrick


-- 
Patrick L. Hartling                    | VP Engineering, Infiscape Corp.
PGP: http://tinyurl.com/2oum9          | http://www.infiscape.com/


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/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.