use introduced getBufferData to determine _target->apply requirements.

This commit is contained in:
Julien Valentin 2018-01-21 01:24:01 +01:00
parent 0aa8008f0a
commit 588a9ae10d

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);