diff --git a/include/osg/TextureRectangle b/include/osg/TextureRectangle index 7afc73296..104b5aef2 100644 --- a/include/osg/TextureRectangle +++ b/include/osg/TextureRectangle @@ -129,8 +129,6 @@ class OSG_EXPORT TextureRectangle : public Texture virtual void computeInternalFormat() const; void allocateMipmap(State& state) const; - void applyTexParameters(GLenum target, State& state) const; - void applyTexImage_load(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const; void applyTexImage_subload(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight, GLint& inInternalFormat) const; diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index ca82246f9..6b1c34dcc 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -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) diff --git a/src/osg/TextureRectangle.cpp b/src/osg/TextureRectangle.cpp index afc1dadfb..67410a1d4 100644 --- a/src/osg/TextureRectangle.cpp +++ b/src/osg/TextureRectangle.cpp @@ -260,21 +260,6 @@ void TextureRectangle::apply(State& state) const } } -void TextureRectangle::applyTexParameters(GLenum target, State& state) const -{ - // get the contextID (user defined ID of 0 upwards) for the - // current OpenGL context. - const unsigned int contextID = state.getContextID(); - - glTexParameteri( target, GL_TEXTURE_WRAP_S, _wrap_s ); - glTexParameteri( target, GL_TEXTURE_WRAP_T, _wrap_t ); - - glTexParameteri( target, GL_TEXTURE_MIN_FILTER, _min_filter); - glTexParameteri( target, GL_TEXTURE_MAG_FILTER, _mag_filter); - - getTextureParameterDirty(contextID) = false; -} - void TextureRectangle::applyTexImage_load(GLenum target, Image* image, State& state, GLsizei& inwidth, GLsizei& inheight) const { // if we don't have a valid image we can't create a texture!