Re: Preventing flicker on moving NSView to a different superview
Re: Preventing flicker on moving NSView to a different superview
- Subject: Re: Preventing flicker on moving NSView to a different superview
- From: Jonathan del Strother <email@hidden>
- Date: Sat, 16 Jul 2005 09:03:45 +0100
On 15 Jul 2005, at 21:23, Troy Stephens wrote:
On Jul 15, 2005, at 11:49 AM, Jonathan del Strother wrote:
I've got a normal Cocoa window containing a large OpenGL-based
NSView. I'm creating a new, borderless window on top of the
original window, and moving the NSView from the old one to the new
one. (The intention here is to expand the new window to give a
zoom effect on entering fullscreen, like Quicktime Pro does)
Here's the code that my NSView uses :
fsWindow = [[NSWindow alloc] initWithContentRect:screenViewFrame
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
[fsWindow setContentView:self];
[fsWindow setHasShadow: NO];
[fsWindow makeKeyAndOrderFront:fsWindow];
However, there's an annoying flicker that appears, as if it's
displaying a flash of the blank fsWindow before it gets filled in
with the NSView. Any ideas on removing this?
The flash you're seeing is either uninitialized window backing
store or uninitialized OpenGL framebuffer contents.
On Tiger, try adding the following before you order the window
forward:
[fsWindow disableScreenUpdatesUntilFlush];
This helps synchronize compositing of the hardware surface with the
rest of the window content.
If app needs to run on pre-Tiger systems as well, you can make the
above conditional on an [fsWindow respondsToSelector:...] check.
Then the problem won't appear on Tiger at least.
Thanks for the suggestion, but no dice.
Are there any debugging tools that might help me here? It might help
if I could catch things mid-flicker so I can see what's going on...
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden