how to set all the value of vtkTextureObject to an init value, eg. 0 or 1 ?

how to set all the value of vtkTextureObject to an init value, eg. 0 or 1 ?

Hello @gpu

Simply use one of these methods to fill the texture with your data at the time of creation.

For 1D textures, vtkTextureObject::Create1DFromRaw(…)
For 2D textures, vtkTextureObject::Create2DFromRaw(…)
For 3D textures, vtkTextureObject::Create3DFromRaw(…)
For cube maps, vtkTextureObject::CreateCubeFromRaw(…)

Instead, If you want to initialize existing texture objects, use the vtkTextureObject::Download method which gives you a vtkPixelBufferObject. You can then write content into that PBO using vtkPixelBufferObject::MapBuffer functions