CanvasSurface¶
class CanvasSurface(val handler: WGPUCanvasContext) : AutoCloseable
Constructors¶
CanvasSurface¶
constructor(handler: WGPUCanvasContext)
Properties¶
handler¶
val handler: WGPUCanvasContext
height¶
preferredCanvasFormat¶
val preferredCanvasFormat: GPUTextureFormat?
width¶
Functions¶
close¶
open override fun close()
Unconfigures the canvas context. The device passed to [`configure`](index.md#configure) is not owned by this surface and is not closed.
configure¶
fun configure(configuration: SurfaceConfiguration)
getCurrentTexture¶
fun getCurrentTexture(): SurfaceTexture
present¶
fun present()
Presentation is handled by the browser once the pass is submitted.