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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user