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



Le 20 déc. 04, à 20:37, Kenneth C. Dyke a écrit :


On Dec 20, 2004, at 11:32 AM, Cyril Kardassevitch wrote:



Le 20 déc. 04, à 19:05, Kenneth C. Dyke a écrit :


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 you mean that it is impossible to copy (via glCopyTexSubImage2D...) both the color and the depth components into 2 different textures ?
In this case how can we do transparent (colored) shadows for exemple ?

No, if you want to copy the texture data out from the PBuffer using glCopyTex[Sub]Image2D, that will work fine for both color and depth. I was referring to the CGLTexImagePBuffer() routine which creates a texture that represents the contents of the entire PBuffer in-place without a copy.



OK...

So, I guess it is possible to use the CGLTexImagePBuffer routine for one of the PBuffer component (color or depth), and to copy the other one with glTexImageSubImage for maximum performance ?


------------------------------------------------------------------------ -----
Cyril Kardassevitch
founder


iLuaC software
www.iluac.com
La Blaquererie, 12230, La Couvertoirade, FRANCE
phone # (33 / 0) 565 587 995
------------------------------------------------------------------------ -----


_______________________________________________
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>)
 >Re: PBuffer questions (From: "Kenneth C. Dyke" <email@hidden>)
 >Re: PBuffer questions (From: Cyril Kardassevitch <email@hidden>)
 >Re: PBuffer questions (From: "Kenneth C. Dyke" <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.