On Sun, Sep 13, 2009 at 1:45 AM, Greg Ewing <[email protected]>wrote:

>
> Tristam MacDonald wrote:
> > As long as all windows are *not*
> > fullscreen, we can retrieve each window's event queue separately - but
> > as soon as one window becomes fullscreen, we have to retrieve events
> > application-wide, and manually handle hit detection and event dispatch
> > for the window system.
>
> How are you doing fullscreen windows? I've implemented
> fullscreen windows in PyGUI that behave the same way as
> other windows with respect to event distribution.
>
> The technique I use is:
>
> * Create a window with no title bar that fills the
> screen.
>
> * Override canBecomeKeyWindow_ and canBecomeMainWindow_
> to allow it to receive events despite not having a
> title bar.
>
> * Override windowDidBecomeMain_ and windowDidResignMain_
> to hide and show the menu bar when the window gains
> and loses the focus.
>
> --
> Greg
>

That gives you a regular window, which fills the screen. In the Windows
world, I believe that is what a fullscreen context is, but unfortunately,
things aren't that simple for Mac.In particular, you take a significant
performance hit on most hardware, because the graphics card is still in
windowed mode.

Instead, we have to capture the display (with
CGDisplayCapture/CGDisplayRelease), and then set the context to fullscreen
(with [NSOpenGLContext setFullScreen]).

However, you have given me an idea - maybe I will create a dummy window
under the capture shield to process events.

-- 
Tristam MacDonald
http://swiftcoder.wordpress.com/

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to