Hi kind of late response here :) that's just how opengl texture works in order to use texture, you need need to allocate memory storage for it with glTexImage2D call, and for this call you should provide internal format(GL_DEPTH_COMPONENT16), format(GL_DEPTH_COMPONENT), and type (GL_UNSIGNED_SHORT)
Cheers. 15.12.2012, 04:49, "Peterakos" <[email protected]>: > Hello. > > Lets say i have a texture which stores the depthmap. > > 1) Is the following correct ? > texture2d->setInternalFormat(GL_DEPTH_COMPONENT16); > texture2d->setSourceFormat(GL_DEPTH_COMPONENT); > texture2d->setSourceType(GL_UNSIGNED_SHORT); > > 2) Why do we need do initialize both internal format and source format > if we are not going to use > any image ? > > Thank you > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

