[osg-users] BindImageTexture Crash

Julien Valentin julienvalentin51 at gmail.com
Thu Feb 1 12:46:50 PST 2018


The bufferobject is null because of the design used for unRefImageDataAfterApply feature
Texture owns textureobjects in order to deref bufferdata

What I propose/ask to Robert is to release only data of the Image data keeping the chain Texture->BufferData(Image)->BufferObject(a new classTextureObject)->GraphicObject intact


dcfennell wrote:
> FYI, I did setUnRefImageDataAfterApply to false. The image data becomes valid, but the buffer object is NULL. One OSG example uses a textureBufferObject with BindTextureImage, which is OK. But if you use a texture, there is no buffer object.
> 
> Perhaps just a simple check for valid 'getBufferData' and then a check for 'getBufferObject'??
> 
> Or even better, if 'to' is NULL, shouldn't just the _target be applied?
> 
> Whether image data is NULL or not, the texture object should be valid after _target->apply if it's setup correctly and have a valid ID to bind (with glBindImageTexture).


------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72906#72906







More information about the osg-users mailing list