Hello Mathias,

Mathias Gaunard wrote:
> Carsten Neumann wrote:
>> unless you need to keep the current data around you can just change part 
>> of the image and call imageContentChanged(xmin, xmax, ymin, ymax, zmin, 
>> zmax) on the TextureChunk.
> 
> Thank you.
> What about Image though? It seems to be copying the data whenever I set 
> it, too.

hm, I'm not certain I understand the question. My suggestion was to 
*not* call setImage on the TextureChunk, but instead only modify the 
Image data and then use TextureChunk::imageContentChanged to specify the 
modified region (without arguments it marks the whole image as modified).
Be careful if you make any changes to the TextureChunk to pass the 
correct FieldMask to begin/endEditCP, otherwise it has to assume 
everything changed and will upload the whole texture [1]. 
imageContentChanged can be called without surrounding it with 
begin/endEditCP, it calls it internally.

        Cheers,
                Carsten


[1] I'm assuming you are using OpenSG 1.x, for 2.0 this is not an issue.

------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to