static TextureBuilder CreateCustom()

robot_2Generated
code_blocksInput

Description

Begins creation of a custom texture. This method returns a TextureBuilder object, which can be used to further define the properties and data of the texture. To complete the creation process, you must call the Create method on the TextureBuilder instance.

Usage

Use this method when you need to create a texture with custom properties or data that are not covered by the standard texture creation methods. This is particularly useful for generating textures dynamically at runtime.

Example

// Example of 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, mipLevels);