vulkano 0.1.0

Safe wrapper for the Vulkan graphics 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 with PhysicalDevice::enumerate().

  • Once you have chosen a physical device to use, you must a Device object from it. The Device is another very important object, as it represents an open channel of communicaton with the physical device.

  • Buffers and Images 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. A Swapchain contains a special Image that corresponds to the content of the window or the monitor. When you present a swapchain, the content of that special image is shown on the screen.

  • ComputePipelines and GraphicsPipelines describe the way the GPU must perform a certain operation. Shaders are programs that the GPU will execute as part of a pipeline.

  • RenderPasses and Framebuffers describe on which attachments the implementation must draw on. They are only used for graphical operations.

  • In order to ask the GPU to do something, you must create a CommandBuffer. A CommandBuffer 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, the CommandBuffer must then be submitted to a Queue, which is obtained when you create the Device.