libstd/vulkan3d
Second layer over libstd/vulkan: command pools and buffers, fences, presenting a frame, shader modules, device memory and buffers, uniform-buffer descriptor sets, depth images, a colour+depth render pass and framebuffer, a position/colour pipeline and an indexed draw. example/vulkan_cube uses it to render a rotating cube.
#include <libstd/vulkan3d>
Includes libstd/vulkan, libstd/math, libstd/file.
Constants
| Name | Value | Meaning |
|---|---|---|
VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO | 16 | |
VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO | 18 | |
VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO | 19 | |
VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO | 20 | |
VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO | 22 | |
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO | 23 | |
VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO | 24 | |
VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO | 25 | |
VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO | 26 | |
VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO | 30 | |
VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO | 28 | |
VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO | 38 | |
VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO | 37 | |
VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO | 15 | |
VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO | 14 | |
VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO | 12 | |
VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO | 5 | |
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO | 32 | |
VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO | 33 | |
VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO | 34 | |
VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET | 35 | |
VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO | 43 | |
VK_SHADER_STAGE_VERTEX_BIT | 1 | |
VK_SHADER_STAGE_FRAGMENT_BIT | 16 | |
VK_VERTEX_INPUT_RATE_VERTEX | 0 | |
VK_FORMAT_R32G32B32_SFLOAT | 106 | |
VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST | 3 | |
VK_POLYGON_MODE_FILL | 0 | |
VK_CULL_MODE_NONE | 0 | |
VK_FRONT_FACE_COUNTER_CLOCKWISE | 0 | |
VK_SAMPLE_COUNT_1_BIT | 1 | |
VK_COMPARE_OP_LESS | 1 | |
VK_COLOR_COMPONENT_RGBA_ALL | 15 | |
VK_ATTACHMENT_LOAD_OP_CLEAR | 1 | |
VK_ATTACHMENT_LOAD_OP_DONT_CARE | 2 | |
VK_ATTACHMENT_STORE_OP_STORE | 0 | |
VK_ATTACHMENT_STORE_OP_DONT_CARE | 1 | |
VK_PIPELINE_BIND_POINT_GRAPHICS | 0 | |
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL | 2 | |
VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL | 3 | |
VK_SUBPASS_EXTERNAL | -1 | |
VK_IMAGE_VIEW_TYPE_2D | 1 | |
VK_COMPONENT_SWIZZLE_IDENTITY | 0 | |
VK_IMAGE_TYPE_2D | 1 | |
VK_FORMAT_D32_SFLOAT | 126 | |
VK_IMAGE_TILING_OPTIMAL | 0 | |
VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT | 32 | |
VK_IMAGE_ASPECT_DEPTH_BIT | 2 | |
VK_BUFFER_USAGE_VERTEX_BUFFER_BIT | 128 | |
VK_BUFFER_USAGE_INDEX_BUFFER_BIT | 64 | |
VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | 16 | |
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | 1 | |
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | 2 | |
VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | 4 | |
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER | 6 | |
VK_INDEX_TYPE_UINT32 | 1 | |
VK_SUBPASS_CONTENTS_INLINE | 0 | |
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT | 1024 | |
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | 256 | |
VK_MEMORY_PROPS_SIZE | 520 |
Classes
sType int
_pad0 int
pNext long
flags int
_pad1 int
codeSize long
pCode long sType int
_pad0 int
pNext long
flags int
stage int
module long
pName str
pSpecializationInfo long sType int
_pad0 int
pNext long
flags int
_pad1 int
size long
usage int
sharingMode int
queueFamilyIndexCount int
_pad2 int
pQueueFamilyIndices long size long
alignment long
memoryTypeBits int
_pad0 int sType int
_pad0 int
pNext long
allocationSize long
memoryTypeIndex int
_pad1 int binding int
descriptorType int
descriptorCount int
stageFlags int
pImmutableSamplers long sType int
_pad0 int
pNext long
flags int
bindingCount int
pBindings long type int
descriptorCount int sType int
_pad0 int
pNext long
flags int
maxSets int
poolSizeCount int
_pad1 int
pPoolSizes long sType int
_pad0 int
pNext long
descriptorPool long
descriptorSetCount int
_pad1 int
pSetLayouts long buffer long
offset long
range long sType int
_pad0 int
pNext long
dstSet long
dstBinding int
dstArrayElement int
descriptorCount int
descriptorType int
pImageInfo long
pBufferInfo long
pTexelBufferView long flags int
format int
samples int
loadOp int
storeOp int
stencilLoadOp int
stencilStoreOp int
initialLayout int
finalLayout int attachment int
layout int flags int
pipelineBindPoint int
inputAttachmentCount int
_pad0 int
pInputAttachments long
colorAttachmentCount int
_pad1 int
pColorAttachments long
pResolveAttachments long
pDepthStencilAttachment long
preserveAttachmentCount int
_pad2 int
pPreserveAttachments long srcSubpass int
dstSubpass int
srcStageMask int
dstStageMask int
srcAccessMask int
dstAccessMask int
dependencyFlags int sType int
_pad0 int
pNext long
flags int
attachmentCount int
pAttachments long
subpassCount int
_pad1 int
pSubpasses long
dependencyCount int
_pad2 int
pDependencies long sType int
_pad0 int
pNext long
flags int
_pad1 int
renderPass long
attachmentCount int
_pad2 int
pAttachments long
width int
height int
layers int
_pad3 int sType int
_pad0 int
pNext long
flags int
_pad1 int
image long
viewType int
format int
componentsR int
componentsG int
componentsB int
componentsA int
subresourceAspectMask int
subresourceBaseMipLevel int
subresourceLevelCount int
subresourceBaseArrayLayer int
subresourceLayerCount int
_pad2 int sType int
_pad0 int
pNext long
flags int
imageType int
format int
extentWidth int
extentHeight int
extentDepth int
mipLevels int
arrayLayers int
samples int
tiling int
usage int
sharingMode int
queueFamilyIndexCount int
_pad1 int
pQueueFamilyIndices long
initialLayout int
_pad2 int binding int
stride int
inputRate int sType int
_pad0 int
pNext long
flags int
vertexBindingDescriptionCount int
pVertexBindingDescriptions long
vertexAttributeDescriptionCount int
_pad1 int
pVertexAttributeDescriptions long sType int
_pad0 int
pNext long
flags int
topology int
primitiveRestartEnable int
_pad1 int offsetX int
offsetY int
extentWidth int
extentHeight int sType int
_pad0 int
pNext long
flags int
viewportCount int
pViewports long
scissorCount int
_pad1 int
pScissors long sType int
_pad0 int
pNext long
flags int
depthClampEnable int
rasterizerDiscardEnable int
polygonMode int
cullMode int
frontFace int
depthBiasEnable int
depthBiasConstantFactor int
depthBiasClamp int
depthBiasSlopeFactor int
lineWidth int
_pad1 int sType int
_pad0 int
pNext long
flags int
rasterizationSamples int
sampleShadingEnable int
minSampleShading int
pSampleMask long
alphaToCoverageEnable int
alphaToOneEnable int sType int
_pad0 int
pNext long
flags int
depthTestEnable int
depthWriteEnable int
depthCompareOp int
depthBoundsTestEnable int
stencilTestEnable int
frontFailOp int
frontPassOp int
frontDepthFailOp int
frontCompareOp int
frontCompareMask int
frontWriteMask int
frontReference int
backFailOp int
backPassOp int
backDepthFailOp int
backCompareOp int
backCompareMask int
backWriteMask int
backReference int
minDepthBounds int
maxDepthBounds int blendEnable int
srcColorBlendFactor int
dstColorBlendFactor int
colorBlendOp int
srcAlphaBlendFactor int
dstAlphaBlendFactor int
alphaBlendOp int
colorWriteMask int sType int
_pad0 int
pNext long
flags int
logicOpEnable int
logicOp int
attachmentCount int
pAttachments long
blendConstants0 int
blendConstants1 int
blendConstants2 int
blendConstants3 int sType int
_pad0 int
pNext long
flags int
setLayoutCount int
pSetLayouts long
pushConstantRangeCount int
_pad1 int
pPushConstantRanges long sType int
_pad0 int
pNext long
flags int
stageCount int
pStages long
pVertexInputState long
pInputAssemblyState long
pTessellationState long
pViewportState long
pRasterizationState long
pMultisampleState long
pDepthStencilState long
pColorBlendState long
pDynamicState long
layout long
renderPass long
subpass int
_pad1 int
basePipelineHandle long
basePipelineIndex int
_pad2 int sType int
_pad0 int
pNext long
renderPass long
framebuffer long
renderAreaOffsetX int
renderAreaOffsetY int
renderAreaExtentWidth int
renderAreaExtentHeight int
clearValueCount int
_pad1 int
pClearValues longFunctions
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
Loads a SPIR-V file into a shader module.
C library function, called as declared in the library's own documentation.
The physical device memory properties (a raw_alloc buffer).
Index of a memory type satisfying the filter and property flags, -1 if none.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
Creates a buffer with bound device memory of the requested properties; returns (buffer, memory).
Maps device memory and returns the host pointer.
Writes a float[16] matrix as 32-bit floats at dst.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
A descriptor set layout with one uniform buffer at binding 0.
A descriptor pool for one uniform buffer set.
Allocates a descriptor set from the pool.
Points binding 0 of a descriptor set at a uniform buffer.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
A 2D image view.
A depth image with its memory; returns (image, memory).
A render pass with one colour and one depth attachment.
A framebuffer for that render pass.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
C library function, called as declared in the library's own documentation.
A graphics pipeline for vertices with a 3-float position and a 3-float colour; returns (pipeline, layout).
Records a full frame: begin render pass, bind pipeline/descriptors/buffers, indexed draw, end.