CGLCreateContext()

Nibbie
Posts: 1
Joined: 2008.09
Post: #1
http://developer.apple.com/documentation...on_12.html

Quote:CGLError CGLCreateContext(CGLPixelFormatObj pix, CGLContextObj share, CGLContextObj *ctx);

share
If not NULL, the context with which to share display lists and an OpenGL texture name space.


Can share be the context we are creating? Should it be? Why do we need to share name space with a context?
Quote this message in a reply
Moderator
Posts: 365
Joined: 2002.04
Post: #2
You would never pass the context you're currently creating, it has to be another context. If you wanted your new context to share textures and display lists with a context you have already created, you would pass the other context's address in the 'share' parameter.

Neil Carter
Nether - Mac games and comic art
Quote this message in a reply
Member
Posts: 72
Joined: 2006.10
Post: #3
The best example for this, I think, is to have a fullScreen context and a windowed conext with a shared namespace. You can then switch back and forth from fullscreen to windowed mode easily that way, without having to reload anything.

HTH

- Sohta
Quote this message in a reply
Nibbie
Posts: 1
Joined: 2008.09
Post: #4
thanks, i get it now. I was wondering, because i already do what Sohta suggested via another way. Cool
Quote this message in a reply
Post Reply