• 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: Screen saver with shared contexts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Screen saver with shared contexts
      • From: David Remahl <email@hidden>
References: 
 >Screen saver with shared contexts (From: David Remahl <email@hidden>)

  • Prev by Date: Re: Drag&Drop image to file
  • Next by Date: Turning Keyboard Repeat Off in a Game
  • Previous by thread: Screen saver with shared contexts
  • Next by thread: Re: Screen saver with shared contexts
  • Index(es):
    • Date
    • Thread