Begins creation of a custom texture. This method returns a TextureBuilder
which can be used to define the properties and data of the texture. To complete the creation process, you must call the Create
method on the TextureBuilder
instance.
Begins creation of a custom texture. This method returns a TextureBuilder
which can be used to define the properties and data of the texture. To complete the creation process, you must call the Create
method on the TextureBuilder
instance.
Use this method when you need to create a custom texture with specific properties or data that are not covered by the standard texture creation methods. After calling this method, configure the texture using the returned TextureBuilder
and finalize it with the Create
method.
// Start creating a custom texture TextureBuilder builder = Texture.CreateCustom(); // Configure the texture using the builder // For example, set the size, format, and data // builder.SetSize(width, height); // builder.SetFormat(ImageFormat.RGBA8); // builder.SetData(data); // Finalize the texture creation Texture customTexture = builder.Create("CustomTextureName", true, data, mipCount);