An open connection to a graphics and/or compute device.

The Device is the responsible for the creation of most rendering and compute resources, as well as exposing Queue objects.

Methods

@:has_untypedcreateBufferWithFloat32Data(data:ReadOnlyArray<Float>, usage:BufferUsage):Buffer

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreateBufferWithUInt16Data(data:ReadOnlyArray<Int>, usage:BufferUsage):Buffer

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreateBufferWithUInt32Data(data:ReadOnlyArray<Int>, usage:BufferUsage):Buffer

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreateCommandEncoder(commandEncoderDescriptor:CommandEncoderDescriptor):CommandEncoder

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreatePipelineLayout(pipelineLayoutDescriptor:PipelineLayoutDescriptor):PipelineLayout

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreateRenderPipeline(renderPipelineDescriptor:RenderPipelineDescriptor):RenderPipeline

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreateShaderModule(data:ReadOnlyArray<Int>):ShaderModule

Throws:

UseAfterDestroyException

If the instance was already destroyed.

createShaderModuleFromFile(path:String):ShaderModule

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedcreateSwapChain(surface:Surface, swapChainDescriptor:SwapChainDescriptor):SwapChain

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypeddestroy():Void

Destroy the device.

Using the instance after this will throw a UseAfterDestroyException exception.

Throws:

UseAfterDestroyException

If the instance was already destroyed.

@:has_untypedgetDefaultQueue():Queue

Throws:

UseAfterDestroyException

If the instance was already destroyed.