RecordingDevice class final

Implemented types

Constructors

RecordingDevice(GraphicsDevice inner)

Properties

defaultColorFormat → TextureFormat
The colour format this device prefers.
no setteroverride
defaultDepthStencilFormat → TextureFormat
The depth/stencil format this device prefers. Legitimately TextureFormat.unknown on a context that has none.
no setteroverride
depthRange → DepthRange
What this backend's clip space maps depth onto.
no setteroverride
events → List<TraceEvent>
What was asked, in order.
final
framebufferOrigin → FramebufferOrigin
Where row zero of a render target is.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
hdrColorFormat → TextureFormat
The format to render high dynamic range colour into.
no setteroverride
hdrOutputFormats → List<TextureFormat>
The formats this device can present an extended-range frame in, empty when it can only present standard range.
no setteroverride
inner → GraphicsDevice
The device every call goes through to.
final
maxAnisotropy → int
The most taps a sampler may take along a foreshortened axis, or 1 for a device that filters isotropically and nothing else.
no setteroverride
maxColorAttachments → int
How many colour attachments one render pass may open — gfx-50n.
no setteroverride
preferredSampleCount → int
Samples to use for multisampled targets, or 1 for none.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shaders → ShaderLibrary
The compiled bundle this device was built with.
no setteroverride
supportsBlendColor → bool
Whether PassEncoder.setBlendColor reaches the hardware.
no setteroverride
supportsCompute → bool
Whether compute pipelines can be created and dispatched — H6. The members below it throw an UnsupportedError where this is false.
no setteroverride
supportsCubeTextures → bool
Whether a cube texture can be created and sampled.
no setteroverride
supportsFloat32Filtering → bool
Whether a 32-bit float texture can be drawn into and sampled with linear filtering.
no setteroverride
supportsGpuTimestamps → bool
Whether this device measures how long the GPU spends in each labelled pass — H2. When true, onGpuTimings is called with them.
no setteroverride
supportsIndependentBlend → bool
Whether a pass with several colour targets can blend each differently.
no setteroverride
supportsMipmaps → bool
Whether a texture built with a hand-supplied mip chain samples correctly.
no setteroverride
supportsOffscreenMsaa → bool
Whether a multisampled offscreen target is available at all.
no setteroverride
supportsRenderToMip → bool
Whether a pass can draw into a mip level below the base — see ColorTarget.mipLevel.
no setteroverride
supportsStencil → bool
Whether the depth attachment this device hands out carries a stencil that PassEncoder.setStencil can test against.
no setteroverride
supportsWireframe → bool
Whether PolygonMode.line can be drawn.
no setteroverride

Methods

beginComputePass({String? label}) → ComputeEncoder
Opens a compute pass; label names it to a debugger and to onGpuTimings.
override
beginFrame() → void
Tells the backend a new frame is starting.
override
beginRenderPass(RenderPassDescriptor descriptor) → CommandEncoder
Opens a pass and returns the encoder that records into it.
override
createComputePipeline(ShaderHandle shader) → ComputePipelineHandle
A pipeline from a compute stage of this device's shader library.
override
createCubeRenderTarget({required int size, required TextureFormat format, int mipLevels = 1}) → TextureHandle?
Allocates a cube texture a pass can draw into, face by face and level by level, with nothing in it yet.
override
createCubeTextureFromPixels({required int size, required TextureFormat format, required List<ByteData> faces, List<List<ByteData>>? mipLevels}) → TextureHandle?
Uploads six square images as one cube texture.
override
createPipeline(ShaderHandle vertex, ShaderHandle fragment, {VertexLayoutSpec? layout}) → PipelineHandle
Links two stages into something that can be bound.
override
createStorageBuffer(ByteData bytes, {bool hostReadable = false}) → StorageBuffer
A storage buffer holding bytes. hostReadable allows readBuffer.
override
createTexture(RenderTargetSpec spec) → TextureHandle
A brand-new texture matching spec, with the single TextureHandle that will ever stand for it.
override
createTextureFromPixels({required int width, required int height, required TextureFormat format, required ByteData pixels, List<ByteData>? mipLevels}) → TextureHandle?
Creates a texture already holding pixels.
override
dispose() → void
Releases every persistent resource this device holds — the textures and geometry buffers handed out by createTexture, createTextureFromPixels, createCubeTextureFromPixels, createCubeRenderTarget and uploadGeometry.
override
loadShaders(ByteData bytes) → Future<LoadedShaderLibrary>
Builds a library from a bundle that arrived as bytes.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onFrameComplete(void whenDone()) → void
Runs whenDone once the GPU has finished with the frame being encoded now.
override
onGpuTimings(void listener(GpuFrameTimings timings)?) → void
Sets where each frame's GPU timings go, a frame or two after it was encoded; null stops them. Never called on a device whose supportsGpuTimestamps is false.
override
overwriteGeometry(GeometryBuffer target, int offsetInBytes, ByteData bytes) → void
Writes bytes into target starting offsetInBytes into it, in place.
override
overwriteTexture(TextureHandle target, ByteData rgba, {ScreenRect? region, int mipLevel = 0}) → Future<void>
Overwrites region (the whole texture by default) of target's base level with rgba — raw RGBA8 bytes, region.width * region.height * 4 of them, row-major from the top the same way readback answers them.
override
readback(TextureHandle texture, {ScreenRect? region}) → Future<ByteData>
The pixels of region — the whole texture by default — as they stand at this point in the queue, without waiting for the GPU to get there.
override
readBuffer(StorageBuffer buffer) → Future<ByteData>
The contents of buffer, once every pass submitted before this call has finished writing it. buffer must be hostReadable.
override
readPixels(TextureHandle texture) → Future<ByteData?>
The texture's pixels: premultiplied RGBA8, row-major from the top-left.
override
releaseGeometry(GeometryBuffer geometry) → void
Releases one geometry buffer, rather than waiting for the whole device to go.
override
releaseStorageBuffer(StorageBuffer buffer) → void
Releases one storage buffer, as releaseGeometry releases geometry.
override
releaseTexture(TextureHandle texture) → void
Gives one back, rather than waiting for the whole device to go.
override
supportsTextureFormat(TextureFormat format) → bool
Whether a texture uploaded in format can be created and sampled here.
override
toString() → String
A string representation of this object.
inherited
uploadGeometry(ByteData bytes, GeometryUsage usage) → GeometryBuffer
Uploads geometry that will outlive the frame.
override

Operators

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