Hello Mathias,
Mathias Gaunard wrote:
> I have been using a 1D texture to transfer an arbitrarily big array of
> data to a shader.
>
> I am however facing a problem: every time I change part of the array, I
> need to recreate a new Image that I will then use in a TextureChunk.
>
> I need to change part of the data every time I move the camera. And even
> with a texture that is only a few vec4s big, this drops the frame-rate
> extremely low.
>
> Are there ways to reduce the extensive copying and/or overhead?
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. This should result in an upload of only the
modified parts, i.e. it uses glTexSubImage1D to update the data.
Cheers,
Carsten
------------------------------------------------------------------------------
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users