Mailing Lists: Apple Mailing Lists

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

Re: CGL + single graphics contexts across dual screen



On Apr 29, 2005, at 3:21 PM, Robert Osfield wrote:

Hi John et al,

On 4/29/05, John Stiles <email@hidden> wrote:
CGL is meant for full-screen (on one screen), or off-screen imaging.
http://developer.apple.com/documentation/GraphicsImaging/Reference/
CGL_OpenGL/

I've looked at this reference documentation, but it really doesn't answer a some key questions, I'm really after a programming guide or tutorial. Do any exist?

What I'm looking for is a full-screen, but across two screens.  The
introductary paragraph to CGL suggests that its Core OpenGL and that
the lowest level integration possible, which suggest that agl etc
would be based on top of it... so any fucntionality in supporting a
single graphics context across two windows should also be possible in
CGL.

You could try to change the existing code to render to an extra-wide
offscreen buffer and then present it to the user yourself with whatever
method you choose

Rendering to an offscreen buffer then pasting on screen would be awful for peformance and a complete backwards step. I know what I'm after *should* be possible - its even possible under GLX under the OSX, its even possible to stretch a single window across two screens, all suggesting the lowest level CGL should also be able to do it, this really shouldn't need to be that complicated, I would have expected a simple parameters to set it.

Does any Apple engineers have an insight there can share here?  Is it
possible to open up a single graphics context across screens under
CGL??

--the path of least resistance would be a window
spanning the two screens (or maybe two windows, one spanning each
screen). You can make the windows borderless and hide the system GUI,
so it will still be immersive. Using CGL for this work is sort of
swimming against the current, though, since Apple explicitly designed
agl and NSOpenGLView for windowed OpenGL display, and they take care of
a lot of the hassles for you automatically.

I don't need a border window right now, but if CGL ain't up to the task then I will have to dump it and go for agl. However, I'd rather not learn a new API just because I haven't been able to track down a simple setting in CGL.

...AGL is pretty much the same as CGL, so you won't really be learning a new API...besides, AGL is just a higher level CGL, in that AGL actually uses CGL transparently...CGL is pretty much for grabbing a display device and doing what you want with it: this can be good because then you know you're the only one using it (ie. no VRAM is taken by, say, the desktop)...AGL is more for windowed usage, but can mimic "fullscreen" by drawing a borderless window as large as ya probably need...if you are doing multiple screens, make sure that all screens are the same color depth, and then you should have now problems...I do this in pd/GEM:


http://sourceforge.net/projects/pd-gem/

...check out "base/GemWinCreateMac.cpp" in cvs-view...

jamie

_______________________________________________
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
References: 
 >CGL + single graphics contexts across dual screen (From: Robert Osfield <email@hidden>)
 >Re: CGL + single graphics contexts across dual screen (From: John Stiles <email@hidden>)
 >Re: CGL + single graphics contexts across dual screen (From: Robert Osfield <email@hidden>)
 >Re: CGL + single graphics contexts across dual screen (From: John Stiles <email@hidden>)
 >Re: CGL + single graphics contexts across dual screen (From: Robert Osfield <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.