View Full Version : How to asynchronously transfer depth texture
09-10-2011, 04:58 AM
I've got a problem with depth setting up texture format. When I use GL_DEPTH_COMPONENT, the fragment shader could access depth texture I uploaded to GPU correctly, but When I set the depth texture format as GL_DEPTH_STENCIL_NV, the result of depth texture access seems wrong, I use GL_DEPTH_STENCIL_NV because I need a 32bit depth buffer to transfer asynchronously&#65292;and the GL_DEPTH_COMPONENT will block CPU to wait depth texture transfer end.
Is there a suitble format both enable asynchronously transfer and GLSL access? many thancks for your help:)
09-12-2011, 12:22 AM
What exactly you mean by asynchronous transfer? Do you transfer the depth texture from/to client memory?
If yes, then use pixel buffer objects (PBO) for the transfer. This way you can make the transfer asynchronous.
09-12-2011, 11:51 PM
yes,I indeed use PBO to transfer texture asynchronously. I mean that I first use PBO read back a depth texture from FBO(FBO is consist of two texture buffer objects), then I upload this texture to another FBO as its depth texture, these two FBOs' depth texture format are all set as GL_DEPTH_STENCIL_NV, which lead to something wrong for GLSL accessing, if GL_DEPTH_COMPONENT, GLSL could read the depth texture well. I don't hnow what wrong in my program.
09-18-2011, 01:28 AM
Why do you make a copy instead of using the depth texture directly?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.