Re: Screen saver with shared contexts
Re: Screen saver with shared contexts
- Subject: Re: Screen saver with shared contexts
- From: Stéphane Sudre <email@hidden>
- Date: Wed, 19 Mar 2003 11:13:50 +0100
On Wednesday, March 19, 2003, at 03:47 AM, David Remahl wrote:
Dear list,
I am making an OpenGL screen saver which uses quite a few textures.
They are generated as the saver goes along, and not all available when
the saver starts. On a multiple display setup, I would like the
textures to be shared by all OpenGL contexts (NSOpenGLContexts used
without a mediating NSOpenGLView).
The problem is, that the ScreenSaver framework gives me few hints when
it comes to what contexts are related. I need to pass the first
context as the shared parameter when creating the second. What method
for doing this would you suggest?
I tried storing the first context created in a static variable and
using it as the shared parameter on subsequent inits, but that doesn't
work as I would like it to, presumably because the preview has its own
context.
Any ideas?
AFAIK, the preview is run by the System Preferences. Whereas the real
screen-saver is run by LoginWindow.
So your solution may work if you just add a test in your code not to
save the context in the static variable when you're in preview mode.
My $0.02
_______________________________________________
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.