ExternalRenderTarget.platform constructor
ExternalRenderTarget.platform(
- Object handle, {
- required int width,
- required int height,
- ExternalTargetHandleKind kind = gpu.ExternalTargetHandleKind.framebuffer,
- PixelFormat format = gpu.PixelFormat.r8g8b8a8UNormInt,
- Color? backgroundColor,
Wraps a platform object the active backend can draw into, through
wrapExternalColorTarget (see that function for what each backend
accepts). Throws UnsupportedError where the backend cannot.
Implementation
ExternalRenderTarget.platform(
Object handle, {
required int width,
required int height,
gpu.ExternalTargetHandleKind kind =
gpu.ExternalTargetHandleKind.framebuffer,
gpu.PixelFormat format = gpu.PixelFormat.r8g8b8a8UNormInt,
this.backgroundColor,
}) : surfaceFrame = null,
color = targets.wrapExternalColorTarget(
handle,
width: width,
height: height,
kind: kind,
format: format,
);