Crate vulkano [−] [src]
Safe and rich Rust wrapper around the Vulkan API.
Brief summary of Vulkan
The
Instance
object is the API entry point. It is the first object you must create before starting to use Vulkan.The
PhysicalDevice
object represents an implementation of Vulkan available on the system (eg. a graphics card, a CPU implementation, multiple graphics card working together, etc.). Physical devices can be enumerated from an instance withPhysicalDevice::enumerate()
.Once you have chosen a physical device to use, you can a
Device
object from it. TheDevice
is the most important object of Vulkan, as it represents an open channel of communicaton with a physical device.Buffer
s andImage
s can be used to store data on memory accessible from the GPU (or Vulkan implementation). Buffers are usually used to store vertices, lights, etc. or arbitrary data, while images are used to store textures or multi-dimensional data.In order to show something on the screen, you need a
Swapchain
. ASwapchain
contains specialImage
s that correspond to the content of the window or the monitor. When you present a swapchain, the content of one of these special images is shown on the screen.ComputePipeline
s andGraphicsPipeline
s describe the way the GPU must perform a certain operation.Shader
s are programs that the GPU will execute as part of a pipeline. Descriptors can be used to access the content of buffers or images from within shaders.For graphical operations,
RenderPass
es andFramebuffer
s describe on which images the implementation must draw upon.In order to ask the GPU to do something, you must create a
CommandBuffer
. ACommandBuffer
contains a list of commands that the GPU must perform. This can include copies between buffers, compute operations, or graphics operations. For the work to start, theCommandBuffer
must then be submitted to aQueue
, which is obtained when you create theDevice
.
Modules
buffer |
Location in memory that contains data. |
command_buffer |
Commands that the GPU will execute (includes draw commands). |
descriptor |
Provides a way for shaders to access the content of buffers and images, or read arbitrary data. |
device |
Communication channel with a physical device. |
format |
Declares all the formats of data and images supported by Vulkan. |
framebuffer |
Targets on which your draw commands are executed. |
image |
Images storage (1D, 2D, 3D, arrays, etc.). |
instance |
API entry point. |
memory |
Device memory allocation and memory pools. |
pipeline |
Describes a graphical or compute operation. |
query |
This module provides support for query pools. |
sampler |
How to retrieve data from an image within a shader. |
swapchain |
Link between Vulkan and a window and/or the screen. |
sync |
Synchronization primitives for Vulkan objects. |
Macros
buffer_slice_field! |
Takes a |
impl_vertex! |
Implements the |
ordered_passes_renderpass! |
Builds a |
pipeline_layout! |
Call this macro with the layout of a pipeline to generate some helper structs that wrap around vulkano's unsafe APIs. |
single_pass_renderpass! |
Builds a |
Enums
OomError |
Error type returned by most Vulkan functions. |
Traits
SafeDeref |
Alternative to the |
SynchronizedVulkanObject |
Gives access to the internal identifier of an object. |
VulkanObject |
Gives access to the internal identifier of an object. |