Description
The ImageFormat
property of the Texture
class specifies the image format of the texture. This property is used to determine how the texture data is stored and interpreted. The format can affect the quality, size, and performance of the texture when used in rendering operations.
Usage
To access the ImageFormat
property, you need to have an instance of the Texture
class. You can then read the property to determine the format of the texture.
Example
// Assuming 'texture' is an instance of Sandbox.Texture
Sandbox.ImageFormat format = texture.ImageFormat;
// Use the format for conditional logic
if (format == Sandbox.ImageFormat.RGBA8)
{
// Perform operations specific to RGBA8 format
}