Merge pull request #454 from mp3butcher/imagebinding

BindingTextureImage: a more complex condition for  _texture->apply ?
This commit is contained in:
OpenSceneGraph git repository
2018-01-23 10:26:20 +00:00
committed by GitHub
3 changed files with 9 additions and 5 deletions

View File

@@ -19,8 +19,9 @@ void BindImageTexture::apply(osg::State&state) const
{
if(_target.valid())
{
osg::Texture::TextureObject *to = _target->getTextureObject( state.getContextID() );
if( !to )
Texture::TextureObject *to = _target->getTextureObject( state.getContextID() );
GLBufferObject *globj = _target->getBufferData()->getBufferObject()->getGLBufferObject( state.getContextID() );
if( !globj || globj->isDirty() )
{
// _target never been applied yet
_target->apply(state);