Robert, thanks for the reply, but I don't undestand something. I'm probably don't understand something about OSG or OpenGL, so I'll describe the way I believe things works, and I'll be glad for corrections.
suppose I'm having several textures, than there possibly could be several texture objects on the gpu, and after the frame is rendered, at most only one of them could be the "active/current/bound" texture. and readFromCurrentTexture will read only that texture. suppose I want to read another texture, I do have to bind it, and only then call readFromCurrentTexture. No? thanks, Guy. ----- Original Message ----- From: "Robert Osfield" <[EMAIL PROTECTED]> To: "osg users" <[email protected]> Sent: Monday, June 18, 2007 11:37 AM Subject: Re: [osg-users] Re: Re: Asking again about states in shaders,and texturing issues (Ulrich Hertlein) > When using osg::Camrea with FBO there is no need to do any expicit > binding of texture objects, it will all done for your. This applies > to the rest of the OSG as well, you won't need to bind texture objects > manually, this will all be done for you. Only in very niche case > where you are creating your own drawables that you might need to start > manually binding textures. > > On 6/18/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hello, > > I have another small question regarding textures and texture objects. > > > > is there a possibility to know what is the current texture object that is > > bound? > > > > I need it since I render to FBO and I want to read it using to > > Image::readFromCurrentTexture. In order to be sure that the "Current > > Texture" is the one attached to the FBO as the color buffer, I call the bind > > of the osg::TextureObject that correspond to the ContextID. > > something like: > > texture.getTextureObject(contextID)->bind(); > > > > The problem is that the call to the bind function, really slows down the > > rendering (from ~200Hz down to ~110Hz). > > I thought to check if the texture objects needs binding and only if so, call > > the bind. > > > > thanks, > > Guy. > > > > > > _______________________________________________ > > osg-users mailing list > > [email protected] > > http://openscenegraph.net/mailman/listinfo/osg-users > > http://www.openscenegraph.org/ > > > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
