Fixed the texture apply method which was broken yesterday, the new code wasn't

checking for the validity of _image before doing checks on it.  This breaks when
render to texture is used as there is no image to check against...

Added osgshadowtexture demo source.  Demos still in development, so don't expect
any shadows yet...
This commit is contained in:
Robert Osfield
2002-11-20 07:46:25 +00:00
parent 3864500e5b
commit 6c8ef3b7df
11 changed files with 483 additions and 13 deletions

View File

@@ -94,7 +94,7 @@ void Texture2D::apply(State& state) const
{
_subloadCallback->subload(*this,state);
}
else if(getModifiedTag(contextID) != _image->getModifiedTag())
else if (_image.valid() && getModifiedTag(contextID) != _image->getModifiedTag())
{
applyTexImage2D(GL_TEXTURE_2D,_image.get(),state,
_textureWidth, _textureHeight, _numMimpmapLevels);