TextureCubeBuilder WithData( System.Byte[] data, int dataLength )

robot_2Generated
code_blocksInput

Description

The WithData method of the TextureCubeBuilder class allows you to specify the raw byte data for the texture cube being built. This method is part of a fluent interface, enabling you to chain multiple configuration methods together to customize the texture cube before finalizing it with the Finish method.

Usage

To use the WithData method, you need to provide a byte array containing the texture data. This data should be formatted appropriately for a texture cube. After setting the data, you can continue to configure other properties of the texture cube using additional methods of the TextureCubeBuilder class.

Example

// Example of using the WithData method
byte[] textureData = LoadTextureData(); // Assume this function loads your texture data
TextureCubeBuilder builder = new TextureCubeBuilder();
Texture textureCube = builder
    .WithData(textureData)
    .WithSize(256, 256) // Example of setting size
    .WithFormat(ImageFormat.RGBA8) // Example of setting format
    .Finish();

// Use the textureCube in your application