Hi Robert,

there is currently some unoptimized code in the osg.
If one do specify for example 10 texture attributes
for a stateset like this:

stateset->setTextureAttribute(i, new
osg::Texture2D());

and after some time you remove this attributes, there
is still an unneccessary call to glActiveTexture. So
the OpenGL calls afterwards are looking like this:

glBlah
glBlah

glActiveTexture(GL_TEXTURE0);
glActiveTexture(GL_TEXTURE1);
glActiveTexture(GL_TEXTURE2);
...
glActiveTexture(GL_TEXTURE9);

glBlah
glBlah


Even if this don't break any functionality it is just
an unneeded pipeline state change, which can be
removed I think.

The problem is maybe in the PositionStateContainer,
because this is the only one which do set texture
active unit based on some lists. I'll try to track
down this and maybe provide some optimization patch
later. Or you can just take a look by yourself.


Best regards,
Art




      __________________________________________________________
Gesendet von Yahoo! Mail.
Der Mailbox mit unbegrenztem Speicher.
http://de.overview.mail.yahoo.com
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to