What does ProceduralTexture.getContent do?

the documentation says “Gets texture content”–what does content refer to?

thanks!
-George

If gets the content of the texture, meaning the data (pixels): internally, it is just doing a texture.readPixels call.

ah ok–is there any reason someone would use Texture.getContent over Texture.readPixels? Or are they the same thing?

getContent has some optimizations that won’t make it call readPixels if the texture has not changed since the last call, so you should use it over readPixels.

1 Like