Fixed typo of _texParametersDirty.
This commit is contained in:
parent
4ddfd8668e
commit
501f28449c
@ -109,7 +109,7 @@ class SG_EXPORT TextureBase : public osg::StateAttribute
|
|||||||
|
|
||||||
/** Sets the border color for this texture. Makes difference only if
|
/** Sets the border color for this texture. Makes difference only if
|
||||||
* wrap mode is CLAMP_TO_BORDER */
|
* wrap mode is CLAMP_TO_BORDER */
|
||||||
void setBorderColor(const Vec4& color) { _borderColor = color; _texParamtersDirty = true; }
|
void setBorderColor(const Vec4& color) { _borderColor = color; _texParametersDirty = true; }
|
||||||
|
|
||||||
const Vec4& borderColor(void) const { return _borderColor; }
|
const Vec4& borderColor(void) const { return _borderColor; }
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ class SG_EXPORT TextureBase : public osg::StateAttribute
|
|||||||
Vec4 _borderColor;
|
Vec4 _borderColor;
|
||||||
|
|
||||||
// true if apply tex parameters required.
|
// true if apply tex parameters required.
|
||||||
mutable bool _texParamtersDirty;
|
mutable bool _texParametersDirty;
|
||||||
|
|
||||||
|
|
||||||
InternalFormatMode _internalFormatMode;
|
InternalFormatMode _internalFormatMode;
|
||||||
|
@ -129,12 +129,12 @@ void Texture::apply(State& state) const
|
|||||||
if (_subloadMode == OFF)
|
if (_subloadMode == OFF)
|
||||||
{
|
{
|
||||||
glBindTexture( GL_TEXTURE_2D, handle );
|
glBindTexture( GL_TEXTURE_2D, handle );
|
||||||
if (_texParamtersDirty) applyTexParameters(GL_TEXTURE_2D,state);
|
if (_texParametersDirty) applyTexParameters(GL_TEXTURE_2D,state);
|
||||||
}
|
}
|
||||||
else if (_image.valid() && _image->data())
|
else if (_image.valid() && _image->data())
|
||||||
{
|
{
|
||||||
glBindTexture( GL_TEXTURE_2D, handle );
|
glBindTexture( GL_TEXTURE_2D, handle );
|
||||||
if (_texParamtersDirty) applyTexParameters(GL_TEXTURE_2D,state);
|
if (_texParametersDirty) applyTexParameters(GL_TEXTURE_2D,state);
|
||||||
|
|
||||||
uint& modifiedTag = getModifiedTag(contextID);
|
uint& modifiedTag = getModifiedTag(contextID);
|
||||||
if (_subloadMode == AUTO ||
|
if (_subloadMode == AUTO ||
|
||||||
|
@ -96,7 +96,7 @@ void Texture1D::apply(State& state) const
|
|||||||
{
|
{
|
||||||
|
|
||||||
glBindTexture( GL_TEXTURE_1D, handle );
|
glBindTexture( GL_TEXTURE_1D, handle );
|
||||||
if (_texParamtersDirty) applyTexParameters(GL_TEXTURE_1D,state);
|
if (_texParametersDirty) applyTexParameters(GL_TEXTURE_1D,state);
|
||||||
|
|
||||||
if (_subloadCallback.valid())
|
if (_subloadCallback.valid())
|
||||||
{
|
{
|
||||||
|
@ -99,7 +99,7 @@ void Texture2D::apply(State& state) const
|
|||||||
{
|
{
|
||||||
|
|
||||||
glBindTexture( GL_TEXTURE_2D, handle );
|
glBindTexture( GL_TEXTURE_2D, handle );
|
||||||
if (_texParamtersDirty) applyTexParameters(GL_TEXTURE_2D,state);
|
if (_texParametersDirty) applyTexParameters(GL_TEXTURE_2D,state);
|
||||||
|
|
||||||
if (_subloadCallback.valid())
|
if (_subloadCallback.valid())
|
||||||
{
|
{
|
||||||
|
@ -117,7 +117,7 @@ void Texture3D::apply(State& state) const
|
|||||||
{
|
{
|
||||||
|
|
||||||
glBindTexture( GL_TEXTURE_3D, handle );
|
glBindTexture( GL_TEXTURE_3D, handle );
|
||||||
if (_texParamtersDirty) applyTexParameters(GL_TEXTURE_3D,state);
|
if (_texParametersDirty) applyTexParameters(GL_TEXTURE_3D,state);
|
||||||
|
|
||||||
if (_subloadCallback.valid())
|
if (_subloadCallback.valid())
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ TextureBase::TextureBase():
|
|||||||
_mag_filter(LINEAR),
|
_mag_filter(LINEAR),
|
||||||
_maxAnisotropy(1.0f),
|
_maxAnisotropy(1.0f),
|
||||||
_borderColor(0.0, 0.0, 0.0, 0.0),
|
_borderColor(0.0, 0.0, 0.0, 0.0),
|
||||||
_texParamtersDirty(true),
|
_texParametersDirty(true),
|
||||||
_internalFormatMode(USE_IMAGE_DATA_FORMAT),
|
_internalFormatMode(USE_IMAGE_DATA_FORMAT),
|
||||||
_internalFormat(0)
|
_internalFormat(0)
|
||||||
{
|
{
|
||||||
@ -37,7 +37,7 @@ TextureBase::TextureBase(const TextureBase& text,const CopyOp& copyop):
|
|||||||
_mag_filter(text._mag_filter),
|
_mag_filter(text._mag_filter),
|
||||||
_maxAnisotropy(text._maxAnisotropy),
|
_maxAnisotropy(text._maxAnisotropy),
|
||||||
_borderColor(text._borderColor),
|
_borderColor(text._borderColor),
|
||||||
_texParamtersDirty(false),
|
_texParametersDirty(false),
|
||||||
_internalFormatMode(text._internalFormatMode),
|
_internalFormatMode(text._internalFormatMode),
|
||||||
_internalFormat(text._internalFormat)
|
_internalFormat(text._internalFormat)
|
||||||
{
|
{
|
||||||
@ -70,9 +70,9 @@ void TextureBase::setWrap(const WrapParameter which, const WrapMode wrap)
|
|||||||
{
|
{
|
||||||
switch( which )
|
switch( which )
|
||||||
{
|
{
|
||||||
case WRAP_S : _wrap_s = wrap; _texParamtersDirty = true; break;
|
case WRAP_S : _wrap_s = wrap; _texParametersDirty = true; break;
|
||||||
case WRAP_T : _wrap_t = wrap; _texParamtersDirty = true; break;
|
case WRAP_T : _wrap_t = wrap; _texParametersDirty = true; break;
|
||||||
case WRAP_R : _wrap_r = wrap; _texParamtersDirty = true; break;
|
case WRAP_R : _wrap_r = wrap; _texParametersDirty = true; break;
|
||||||
default : notify(WARN)<<"Error: invalid 'which' passed TextureBase::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<std::endl; break;
|
default : notify(WARN)<<"Error: invalid 'which' passed TextureBase::setWrap("<<(unsigned int)which<<","<<(unsigned int)wrap<<")"<<std::endl; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,8 +95,8 @@ void TextureBase::setFilter(const FilterParameter which, const FilterMode filter
|
|||||||
{
|
{
|
||||||
switch( which )
|
switch( which )
|
||||||
{
|
{
|
||||||
case MIN_FILTER : _min_filter = filter; _texParamtersDirty = true; break;
|
case MIN_FILTER : _min_filter = filter; _texParametersDirty = true; break;
|
||||||
case MAG_FILTER : _mag_filter = filter; _texParamtersDirty = true; break;
|
case MAG_FILTER : _mag_filter = filter; _texParametersDirty = true; break;
|
||||||
default : notify(WARN)<<"Error: invalid 'which' passed TextureBase::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<std::endl; break;
|
default : notify(WARN)<<"Error: invalid 'which' passed TextureBase::setFilter("<<(unsigned int)which<<","<<(unsigned int)filter<<")"<<std::endl; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,7 +117,7 @@ void TextureBase::setMaxAnisotropy(float anis)
|
|||||||
if (_maxAnisotropy!=anis)
|
if (_maxAnisotropy!=anis)
|
||||||
{
|
{
|
||||||
_maxAnisotropy = anis;
|
_maxAnisotropy = anis;
|
||||||
_texParamtersDirty = true;
|
_texParametersDirty = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ void TextureBase::applyTexParameters(GLenum target, State&) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
_texParamtersDirty=false;
|
_texParametersDirty=false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,7 +209,7 @@ void TextureCubeMap::apply(State& state) const
|
|||||||
if (handle != 0)
|
if (handle != 0)
|
||||||
{
|
{
|
||||||
glBindTexture( GL_TEXTURE_CUBE_MAP, handle );
|
glBindTexture( GL_TEXTURE_CUBE_MAP, handle );
|
||||||
if (_texParamtersDirty) applyTexParameters(GL_TEXTURE_CUBE_MAP,state);
|
if (_texParametersDirty) applyTexParameters(GL_TEXTURE_CUBE_MAP,state);
|
||||||
|
|
||||||
if (_subloadCallback.valid())
|
if (_subloadCallback.valid())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user