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/

Reply via email to