i’m trying to setup a pBuffer with 10.3 using glut, trying to do some write-once-compile-every-were code. I want to keep system depended code as small as possible.
but it’s not working
My iddea was to save whatever context glut created
into ‘current’ and then just switch back after writing to the pbuffer.
What i’m doing wrong?
Also, I don’t think aglGetCurrentContext will give you a valid context if the current context is not an AGL context (it will be an NSOpenGLContext with GLUT). Using CGL rather than AGL will avoid this problem.
Thanks for your reply’s.
Ok … i’d better kick glut and do my own window, since mixing would be more complicated than doing it from scratch.
I was just dreaming of an easy way, like using extensions in unix’es compared to windows.
So i’ve read that AGL is just a thin layer above CGL? Whats AGL’s sense related to CGL then? I hope its ‘real’ pBuffer and not just a window at -1024; 0 …
AGL is the ‘old’ OpenGL API used by MacOS 9. It is using CGL on MacOS X.
Now why not using CGL only ? Because if your application is running a window, you can’t use it. You cannot create an ‘CGL’ context for a windowed application (go figure why …)
So you will still have to uses AGL if your application is 'windowed.
If your application is ‘fullscreen’ only, uses CGL, and stay clear away from AGL : Mainly, because it is broken in MacOS 10.4 when running in full screen (this was confirmed by other person already).
For the PBuffer and its internals. It’s the Big Mystery. I’ve posted some questions in the past, but nobody was able to answer them : Here a few ones :
PBuffers and Depth component running on various videos cards ? Does it work ? how to initialize ? What’s happening on ATI 9x / Xx00 series (On Windows, you cannot create depth component PBuffer on ATI. Only nVidia supports it) ?
PBuffers and NSOpenGL ? How to initialize it correctly (very capricious this one, with different behaviours on each different revision of MacOSX and very poorly documented),
Are PBuffers double buffered like on Windows ?
PBuffers with floating point texture which were ‘undocumented’ in MacOS 10.3, but now documented in 10.4 (Well, just 1 line about it) ?