From Mathias Froehlich, Changed osg::TextureRectangle to use osg::Texutre::applyTexParameters() to take advantage of texture shadow extension settings for texture rectangle

This commit is contained in:
Robert Osfield
2009-04-24 09:07:22 +00:00
parent b496d220c6
commit 7b16ff5ae1
3 changed files with 2 additions and 18 deletions

View File

@@ -19,6 +19,7 @@
#include <osg/Timer>
#include <osg/ApplicationUsage>
#include <osg/FrameBufferObject>
#include <osg/TextureRectangle>
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Mutex>
@@ -830,7 +831,7 @@ void Texture::applyTexParameters(GLenum target, State& state) const
}
// integer texture are not supported by the shadow
if (extensions->isShadowSupported() && target == GL_TEXTURE_2D &&
if (extensions->isShadowSupported() && (target == GL_TEXTURE_2D || target == GL_TEXTURE_RECTANGLE) &&
_internalFormatType != SIGNED_INTEGER && _internalFormatType != UNSIGNED_INTEGER)
{
if (_use_shadow_comparison)