createTexture method
- StorageMode storageMode,
- int width,
- int height, {
- PixelFormat format = PixelFormat.r8g8b8a8UNormInt,
- dynamic sampleCount = 1,
- TextureCoordinateSystem coordinateSystem = TextureCoordinateSystem.renderToTexture,
- bool enableRenderTargetUsage = true,
- bool enableShaderReadUsage = true,
- bool enableShaderWriteUsage = false,
Allocates a new texture in GPU-resident memory.
Returns null
if the Texture creation failed.
Implementation
Texture? createTexture(StorageMode storageMode, int width, int height,
{PixelFormat format = PixelFormat.r8g8b8a8UNormInt,
sampleCount = 1,
TextureCoordinateSystem coordinateSystem =
TextureCoordinateSystem.renderToTexture,
bool enableRenderTargetUsage = true,
bool enableShaderReadUsage = true,
bool enableShaderWriteUsage = false}) {
Texture result = Texture._initialize(
this,
storageMode,
format,
width,
height,
sampleCount,
coordinateSystem,
enableRenderTargetUsage,
enableShaderReadUsage,
enableShaderWriteUsage);
return result.isValid ? result : null;
}