Hi I think if you render to fbo bit depth depends of internal texture format, in case of rendering to framebuffer idk.
Cheers. 04.07.2012, 14:30, "Martin Groer" <grosser.mar...@gmx.de>: > Hello Sergey, > > thanks, it works! :-) > > Should I change the number of depth buffer bits? GL_DEPTH_BITS is 24, so I > think it doesn't make sense to save this into 32 bit. Or is this independent > if the GL_DEPTH_BITS? > > Cheers > > Martin > > -------- Original-Nachricht -------- > >> Datum: Wed, 04 Jul 2012 14:13:11 +0400 >> Von: Sergey Polischuk <pol...@yandex.ru> >> An: OpenSceneGraph Users <osg-users@lists.openscenegraph.org> >> Betreff: Re: [osg-users] Render depth into texture with 32 bits >> Hi, Martin >> >> try this: >> >> texture2D->setSourceFormat(GL_DEPTH_COMPONENT); >> texture2D->setInternalFormat(GL_DEPTH_COMPONENT32); >> texture2D->setSourceType(GL_UNSIGNED_INT); >> >> Cheers, >> Sergey. >> >> 04.07.2012, 14:06, "Martin Groer" <grosser.mar...@gmx.de>: >>> Hello, >>> >>> how many bits are used by the GL_DEPTH_COMPONENT? I want to render the >> depth buffer value into a texture and use the internal texture format >> GL_DEPTH_COMPONENT. I would like use 24 or 32 bits for this value so I try >> GL_DEPTH_COMPONENT24 and GL_DEPTH_COMPONENT32 as internal format, but the >> rendering doesn't work. Only the GL_DEPTH_COMPONENT works, but I don't know >> how >> many bits are used. Is the number of bits depending on the Z-Buffer? My >> Z-Buffer use 24 bits. >>> Following the error message of GL_DEPTH_COMPONENT24: >>> --------------------------------------------------------------------- >>> Using host libthread_db library "/lib64/libthread_db.so.1". >>> RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x8cd6 >>> Warning: FrameBufferObject: could not create the FBO >>> RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x0 >>> Warning: FrameBufferObject: could not create the FBO >>> RenderStage::runCameraSetUp(), FBO setup failed, FBO status= 0x0 >>> FRAGMENT glCompileShader "" FAILED >>> FRAGMENT glCompileShader "" FAILED >>> glLinkProgram "" FAILED >>> >>> Cheers >>> >>> Martin >>> _______________________________________________ >>> osg-users mailing list >>> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >> _______________________________________________ >> osg-users mailing list >> osg-users@lists.openscenegraph.org >> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org