Device
A logical device and its queue; every other object comes from one.
Static methods
function hxnAdopt(hxnRaw:Handle):DeviceAn object for a value the library returned.
Properties
var hxnRaw:HandleMethods
function createBuffer(size:Int64, usage:Int):BufferA buffer of size bytes in memory the CPU can map, zeroed, with usage bits.
function createBufferWith(bytes:Bytes, usage:Int):BufferA buffer holding a copy of bytes.
function createImage(descriptor:ImageDescriptor):ImageA 2D image in device memory, in the undefined layout, with one view of all of it.
function createSampler(min:Filter, mag:Filter, address:AddressMode):Samplerfunction createShaderModule(spirv:Bytes):ShaderModuleA shader module from SPIR-V: hxnsl's spirv().
function createSetLayouts(sets:Array<SetLayout>):SetLayoutsThe descriptor set layouts of a pipeline, set 0 first: one per hxnsl bind group.
function createPipelineLayout(sets:SetLayouts):PipelineLayoutA pipeline layout of all of sets.
function createDescriptorSet(sets:SetLayouts, index:Int):DescriptorSetA descriptor set of set index of sets, from a pool of its own.
function createComputePipeline(module:ShaderModule, entry:String, layout:PipelineLayout):PipelineA compute pipeline running entry of module: hxnsl's entry point names (main).
function createGraphicsPipeline(vertex:ShaderModule, vertexEntry:String, fragment:ShaderModule, fragmentEntry:String, layout:PipelineLayout, format:Format, topology:Topology, bindings:Array<VertexBinding>, attributes:Array<VertexAttribute>):PipelineA graphics pipeline for dynamic rendering into one color attachment of format, with a dynamic viewport and scissor, no blending and no culling.
function createCommandBuffer():CommandBufferA primary command buffer, from a pool of its own, ready to record.
function createSwapchain(surface:Surface, width:Int, height:Int, format:Format, vsync:Bool):SwapchainA swapchain on surface of width by height format images, presenting with the display's refresh when vsync. The window may size it differently: see width.
function submitAndWait(commands:CommandBuffer):VoidSubmits commands, ending it first, and waits for the GPU to finish them.
function submit(commands:CommandBuffer):Future<Unit>Submits commands, ending it first. The future settles when the GPU has finished them.
function close():VoidReleases the native value now. The collector does it otherwise. Using this object afterwards throws.