[osg-users] Correct way to modify Image used in a Texture2D (and have the Texture2D re-upload)

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Wed Apr 15 02:45:39 PDT 2020


I'm trying to figure out the correct way to notify Texture2D that I've 
modified the raw bytes of its underlying Image (previous set via setImage)

I'm modifying the image data using image->data(), and then calling 
image->dirty() once modifications are complete. I can see this changes the 
'modificationCount' of base-class BufferData, and if I write the image out 
to disk, it contains the changes. So, the image is being modified correctly.

However, the Texture2D doesn't seem to to schedule a glTexSubImage2D (or 
similar ) on the next draw. What I'd be expecting is that Texture2D sees 
that the image modification count has changed, and uploads the new data.

I tried to find other similar places in the code - eg the VncPlugin just 
calls 'dirty' on its Image as far as I can see. 

What else can I check to debug this?


-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/7d933227-d014-4afd-a445-c7854d5cda26%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200415/b394bdf9/attachment.html>


More information about the osg-users mailing list