From Lilith Bryant, "As discussed previously on the users list. Fixes the redundant calls to

glActiveTexture on every State::apply after more than one texunits have been
used.

This is against 2.9.6 (I think SVN head is the same)

Quick Synopsis:

New functions:

State::applyModeOnTexUnit
State::applyAttributeOnTexUnit
State::applyModeMapOnTexUnit
State::applyAttributeMapOnTexUnit
State::applyModeListOnTexUnit
State::applyAttributeListOnTexUnit

All copies of the normal versions, but they also set the active tex unit if
absolutely necessary (i.e. only if they call something OpenGL).

State::apply (*2)
State::applyTextureAttribute

Changed to call the above functions and no longer call setActiveTextureUnit
themselves.

State::setActiveTextureUnit

Made inline, so the benefit of having applyModeOnTexUnit (etc) inline
is retained.
"
This commit is contained in:
Robert Osfield
2010-01-07 16:49:12 +00:00
parent 5d9bf9f4d5
commit 248a0813db
3 changed files with 399 additions and 51 deletions

View File

@@ -914,6 +914,13 @@ BEGIN_OBJECT_REFLECTOR(osg::State)