GpuContext class base

A handle to a graphics context. Used to create and manage GPU resources.

To obtain the default graphics context, use getContext.

Properties

defaultColorFormat PixelFormat
A supported PixelFormat for textures that store 4-channel colors (red/green/blue/alpha).
no setter
defaultDepthStencilFormat PixelFormat
A supported PixelFormat for textures that store both a stencil and depth component. This will never return a depth-only or stencil-only texture.
no setter
defaultStencilFormat PixelFormat
A supported PixelFormat for textures that store stencil information. May include a depth channel if a stencil-only format is not available.
no setter
doesSupportOffscreenMSAA bool
Whether the backend supports multisample anti-aliasing for offscreen color and stencil attachments. A subset of OpenGLES-only devices do not support this functionality.
no setter
hashCode int
The hash code for this object.
no setterinherited
minimumUniformByteAlignment int
The minimum alignment required when referencing uniform blocks stored in a DeviceBuffer.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createCommandBuffer() CommandBuffer
Create a new command buffer that can be used to submit GPU commands.
createDeviceBuffer(StorageMode storageMode, int sizeInBytes) DeviceBuffer?
Allocates a new region of GPU-resident memory.
createDeviceBufferWithCopy(ByteData data) DeviceBuffer?
Allocates a new region of host-visible GPU-resident memory, initialized with the given data.
createHostBuffer({int blockLengthInBytes = HostBuffer.kDefaultBlockLengthInBytes}) HostBuffer
Creates a bump allocator that managed a DeviceBuffer block list.
createRenderPipeline(Shader vertexShader, Shader fragmentShader) RenderPipeline
createTexture(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}) Texture?
Allocates a new texture in GPU-resident memory.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited