GraphicsDevice constructor

GraphicsDevice({
  1. Color clearValue = const Color(0x00000000),
  2. GpuContext? gpuContext,
})

The Graphical Device provides a way for developers to interact with the GPU by binding different resources to it.

A single render call starts with a call to begin and only ends when end is called. Any resource that gets bound to the device in between these two method calls will be uploaded to the GPU and returns as an Image in end.

Implementation

GraphicsDevice({
  this.clearValue = const Color(0x00000000),
  gpu.GpuContext? gpuContext,
}) : _gpuContext = gpuContext ?? gpu.gpuContext;