Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PBuffer questions



On Dec 20, 2004, at 9:35 AM, bsupnik wrote:


Hi Y'all,

A few basic pbuffer questions:

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

This email sent to email@hidden
References: 
 >PBuffer questions (From: bsupnik <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.