[osg-users] BindImageTexture Crash
Julien Valentin
julienvalentin51 at gmail.com
Wed Feb 7 10:59:46 PST 2018
Okay
I gone totally mad with this PR...(chainsaw night fever)
Mea Culpa
So to sum up the problem:
- BindImageTexture stateattribute is not a textureattribute (_imageunit != _textureunit) but it sometimes have to bind texture object on a textureunit in case data of the associated texture has gone dirty
We then need a way to know if texture have to be applied:
What I've propose :
- clarify semantic given to textures::_modifiedcount to be the textureobjectmodifiedcount. Son as tos belong to Texture i putted modifiedcount in Texture and removed it from daughter classes
-in LayeredTextures (cubemap, texture2Darray) i changed modifiedcount to layermodifiedcount these flags doesn't have the same purpose as the textureobjectmodifiedcount as it's just a inner mecanism not t upload unchanged layer image (not related to the to)
https://github.com/openscenegraph/OpenSceneGraph/pull/467
My pr has been rejected so i ask community reviews and insights because I can see a better compromise to finish BindImageTexture
Thanks in advance
mp3butcher wrote:
> https://github.com/openscenegraph/OpenSceneGraph/pull/465
>
> Here's what I'm thinking of....sorry for the huge commit
> ChangeLog (in absence of commit history)
>
> 1) introduce a TextureGraphicObject ( buffered_object PCTOs )
> 2) inject a base class PerContextGraphicObject (base of BufferObject, TextureGraphicObject (bufferedPCTOs), ProgramsObject ..)
> 3) deprecate Image less Texture by adding an Image with NULL data and make unrefimageafterapply just deallocate Image (may require further data==0 tests to ensure retrocomp)
> 4) remove buffered_object from Texture to use the TextureGraphicObject of its Image instead
>
> I'll try to clean the PR if community is happy with it
>
>
>
> robertosfield wrote:
> > I have reverted the PR, this resolved the osgcomputeshaders bug.
> >
> > On 2 February 2018 at 09:17, Robert Osfield <> wrote:
> >
> > > On 1 February 2018 at 20:46, Julien Valentin <> wrote:
> > >
> > > > 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
> > > >
> > >
> > > Umm.... lets change something that's been working fine for well over a
> > > decade to fix an issue recently introduce by an ill-considered
> > > submission.
> > >
> > > I will need to look deeper into the issue and decide what is best to
> > > do. I don't have the time to do this right away. Might have time
> > > next week.
> > >
> > > Robert.
> > >
> > _______________________________________________
> > osg-users mailing list
> >
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> > ------------------
> > Post generated by Mail2Forum
> [list=][/list]
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72946#72946
More information about the osg-users
mailing list