Bruno Rodrigues De Araujo (IMMI INESC-ID) wrote: > Hello, > > I am trying to get access to Depth Information using FBOViewport Object > but the data is always 0. > Is it possible to use FBOViewport to render the Depth of a 3D scene into > a texture to be used by a shader?
Yup. :) > imgDepth->set(Image::OSG_L_PF, ::fboWidth, ::fboHeight, > 1, 1, 1, 0, NULL, > Image::OSG_UINT8_IMAGEDATA, false);' Try setting Pixelformat to GL_DEPTH_COMPONENT. (No, it isn't in the Image::PixelFormat enum, but it will work, as that value is a GL enum that is passed straight to glTexture2D()) /Marcus ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
