Can a pbuffer have an associated depth buffer? If so, is it possible
to use this as a depth texture (as would be done with the
shadow-mapping extensions)?
Yes, and yes. For the former, as long as the pixel format for the
context attaching to the pixel format has the attributes for a depth
buffer, the pixel buffer itself will have a depth buffer. For the
latter, make sure that you set the internalFormat argument for
CGLCreatePBuffer to GL_DEPTH. That will ensure that any textures
created from the PBuffer are depth textures. There is a limitation in
the PBuffer API right now that means you can't use the PBuffer as both
a color and depth texture.
Do I have to worry about getting compatible pixel formats between my
main ogl window and the pbuffer? It looks like I could pass
kCGLPFAPBuffer to CGLChoosePixelFormat, but since I am using AGL, I
cannot even pass that, and the shared pbuffer example just passes some
very simple attributes. It looks like aglSetPBuffer will do the actual
resource allocation and takes a virtual screen, but is there a risk
that my pixel formats could already be mismatched?
In general you don't have to worry about compatible pixel formats
*except* that you need to make sure that the pixel format used for your
PBuffer covers all of the same renderers as your windowed context.
However, you could certainly use a 16-bit deep PBuffer with a 32-bit
windowed context.
-Ken
Kenneth Dyke, email@hidden (personal), email@hidden (work)
Sr Engineer, Quartz Effects Team, Apple Computer, Inc.
C++: The power, elegance and simplicity of a hand grenade.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden