getWhitePlaceholderTexture static method
Texture
getWhitePlaceholderTexture(
)
Implementation
static gpu.Texture getWhitePlaceholderTexture() {
if (_whitePlaceholderTexture != null) {
return _whitePlaceholderTexture!;
}
_whitePlaceholderTexture = gpu.gpuContext.createTexture(
gpu.StorageMode.hostVisible,
1,
1,
);
if (_whitePlaceholderTexture == null) {
throw Exception('Failed to create white placeholder texture.');
}
_whitePlaceholderTexture!.overwrite(
Uint32List.fromList(<int>[0xFFFF7F7F]).buffer.asByteData(),
);
return _whitePlaceholderTexture!;
}