Sharing textures in AGL contexts?
Is there any way to share textures and display lists over two AGL contexts? (I'm trying to let the player switch from fullscreen to window mode on-the-fly)
I remember hearing something about this a long time ago... :/
I remember hearing something about this a long time ago... :/
Yep. When you create a context, there's an extra parameter to pass a "share context". The new context will share the textures, lists, vertex programs, VAOs, &c with the old one, so any object created in either will be available in the other.
The two contexts have to have compatible pixel formats. That means same renderer (probably have to restrict to a single screen), same bit depth, probably both need "no recovery" in the pixel format, &c.
The two contexts have to have compatible pixel formats. That means same renderer (probably have to restrict to a single screen), same bit depth, probably both need "no recovery" in the pixel format, &c.
Interesting, I'll delve into it tomorrow. By the way, do you have any idea about the size of your brain?
Be careful with this feature, I kernel panic if I try to shift a GL namespace from my AGP R7500 to a PCI card (Rage 128 for sure, haven't tried it with the Radeon).
It will never work across different accelerator cards, and could not be expected to.
It's bad that it panics, though. Have you submitted a bug to Apple?
It's bad that it panics, though. Have you submitted a bug to Apple?
I don't think that note about different accelerator cards is in the docs.
Don't you need a high-level (i.e. costly) ADC account to send Apple bugs?
Don't you need a high-level (i.e. costly) ADC account to send Apple bugs?
Nope. Online is fine. Sign up for free at http://connect.apple.com/ (you have to be 18 or over).
Just go to http://bugreporter.apple.com/ to submit bugs.
Just go to http://bugreporter.apple.com/ to submit bugs.
Quote:Originally posted by Mark Levin
I don't think that note about different accelerator cards is in the docs.
The docs say that you need compatible pixel formats, and you can never get compatible pixel formats for different accelerator cards (even if they're the same make & model), so even if it's not explicitly there, it's there.
Fenris Wrote:Is there any way to share textures and display lists over two AGL contexts? (I'm trying to let the player switch from fullscreen to window mode on-the-fly)
I remember hearing something about this a long time ago... :/
Hi Fenris,
I have made some code that can actually do this. It's working, but I am not quite pleased with it. I started a new thread to see if I could get some more feedback on the fullscreen/window problem. It is located at: http://www.idevgames.com/forum/showthrea...#post69509
BTW: OneSadCookie, thanks for the aglCreateContext tip. I did everything right except that part
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| NSOpenGLContext sharing question | TomorrowPlusX | 4 | 3,858 |
Oct 19, 2006 09:33 AM Last Post: akb825 |
|
| Sharing multiple contexts with NSGL | maaaaark | 1 | 1,767 |
Apr 27, 2006 05:10 PM Last Post: akb825 |
|
| Context Sharing and Hardware | Matrix | 3 | 2,579 |
May 5, 2005 07:23 PM Last Post: Matrix |
|
| Sharing textures in SDL's OpenGL surfaces | PowerMacX | 4 | 3,834 |
Oct 11, 2004 01:34 PM Last Post: OneSadCookie |
|
| Sharing textures in AGL contexts? Part II | isgoed | 3 | 2,943 |
Oct 6, 2004 12:06 AM Last Post: isgoed |
|

