From Sohey Yamamoto, added support for GL_TEXTURE_FILTER_CONTROL/GL_TEXTURE_LOD_BIAS.

This commit is contained in:
Robert Osfield
2004-10-13 19:52:39 +00:00
parent 9a393bfd5d
commit cecaec4ed8
6 changed files with 139 additions and 0 deletions

View File

@@ -7,6 +7,12 @@
#include <osg/TextureRectangle>
#include <osg/TextureCubeMap>
// #define COMPILE_TEXENVFILTER_USAGE
#if COMPILE_TEXENVFILTER_USAGE
#include <osg/TexEnvFilter>
#endif
using namespace osg;
using namespace osgGA;
@@ -111,6 +117,21 @@ bool StateSetManipulator::handle(const GUIEventAdapter& ea,GUIActionAdapter& aa)
}
}
break;
#if COMPILE_TEXENVFILTER_USAGE
case 'm' :
{
osg::TexEnvFilter* texenvfilter = dynamic_cast<osg::TexEnvFilter*>(_drawState->getTextureAttribute(0,osg::StateAttribute::TEXENVFILTER));
if (!texenvfilter)
{
texenvfilter = new osg::TexEnvFilter;
_drawState->setTextureAttribute(0,texenvfilter);
}
// cycle through the available modes.
texenvfilter->setLodBias(texenvfilter->getLodBias()+0.1);
}
break;
#endif
}
}
return false;