It is a very simple example, perfect to understand.
I’d like to modify the 3D texture on the fly. Is it possible ?
I have read a lot of stuff about memory and CUDA but I don’t understand everything yet…
It is unclear if it is possible to modify the texture array on the fly. If YES, how ? :D
If no, is it possible to copy the entire new texture on the fly ? and how ?!
On the example, the texture is stored on “cudaArray *d_volumeArray = 0;”
Maybe I have to change the type of memory but for which one ?
my voxelPlancton code (which is based on the volume visualization sample) changes the 3D texture
when the user presses one of the cursor keys. Not sure if this qualifies as “on the fly”.
the new data has to pass through the host though, as it has to be copied into the 3D texture.
Indeed, I try to keep the original texture on the host memory, to modify it on the host and to copy it globally as during the init and YES it works. It is not as beautiful as I would like, but at less it works :)
Thanks for your answer, I am going to check if I can find your code.
But I can check the source code and it is basically the same thing I have done (expect I build the texture on the host and copy it from the host to the device, and you are building the texture on the device also)
On your case, the texture seems to be completely different, so the method is coherent.
But if only a small part of the texture is modified, do you think there is a way to only copy the new values at the right place in memory?