• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CGShieldingWindowLevel question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CGShieldingWindowLevel question


  • Subject: Re: CGShieldingWindowLevel question
  • From: John Stauffer <email@hidden>
  • Date: Fri, 13 Jun 2003 11:25:47 -0700

A full screen OpenGL context by definition will take over the display. Meaning the display frame buffer could become swizzled into some hardware specific format and page flipped. So attempting to pop a window over the top of a full screen OpenGL context will never really work right. You have 2 choices if you have a requirement to do this.

1) Use a windowed OpenGL context. You'll pay up to a 10% performance penalty for high frame rates on high res displays.

2) Detach the full screen OpenGL context from the display device before you attempt to pop a window over the top.

Both of these will require you to do the usual startFullScreen/endFullScreen code you have below.

John

On Friday, June 13, 2003, at 10:57AM, FeiL wrote:

Thanks for responding and recommending me to a very great web site.

This works well in one application but If I have one full screen OpenGL application drawing something and another one want to show the window above it( I set a timer in which to display() and update() the window every 1 second), it only shows part of the title bar with three buttons(close, miniaturize, resize). If I set it to a boarderless window, it will draw nothing. I wonder if OpenGL prevent all the drawing from window server at this time?

Thanks very much for any idea.
Fei


On Thursday, June 12, 2003, at 11:29 AM, sinclair44 wrote:

On 6/11/03 1:54 PM, "FeiL" <email@hidden> wrote:

I wonder what does this mean. This function can be used after
CGDisplayCapture() which will bring up a shield window. But after
capture the display, window server will gone, how can I set the cocoa
window level.

I have a full screen OpenGL application and another cocoa application
which have a timer to check if display is captured then set the window
level to be the shield window level+1. I run the cocoa application
first and then run the full screen OpenGL, I got an error message:
PSsetwindowlevel, error setting window level (1001).

Try this:

- (void)startFullScreen
{
CGDisplayCapture(kCGDirectMainDisplay);
[window setLevel:CGShieldingWindowLevel()];
}

- (void)endFullScreen
{
[window setLevel:NSNormalWindowLevel];
CGDisplayRelease(kCGDirectMainDisplay);
}

Also, have a look at <http://cocoadevcentral.com/articles/000028.php>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: CGShieldingWindowLevel question
      • From: FeiL <email@hidden>
    • Re: CGShieldingWindowLevel question
      • From: publiclook <email@hidden>
References: 
 >Re: CGShieldingWindowLevel question (From: FeiL <email@hidden>)

  • Prev by Date: array performance
  • Next by Date: Re: Dictionary or Array?
  • Previous by thread: Re: CGShieldingWindowLevel question
  • Next by thread: Re: CGShieldingWindowLevel question
  • Index(es):
    • Date
    • Thread