Skip to main content

Crate kazan

Crate kazan 

Source
Expand description

Vulkan bindings for Rust, generated from the official Vulkan-Headers vk.xml registry.

§Modules

§Function tables

Each API version and extension defines its own InstanceFn / DeviceFn struct. Load them with the LoadInstanceFn and LoadDeviceFn traits. Entry bootstraps the loading chain.

§Quick start

use kazan::{Entry, LoadDeviceFn as _, LoadInstanceFn as _, vk::{self, vk1_0}};

let entry = unsafe { Entry::load()? };
let instance = entry.vk1_0.create_instance(&create_info, None)?;
let instance_fn = unsafe { vk1_0::InstanceFn::load(&entry, instance)? };
let device = unsafe { instance_fn.create_device(physical_device, &device_create_info, None)? };
let device_fn = unsafe { vk1_0::DeviceFn::load(&instance_fn, device)? };

Re-exports§

pub use vk::ffi;ffi
pub use util::read_spv;std

Modules§

util
Utility functions (SPIR-V decoding).
vk
Vulkan types, constants, and function pointer tables.
windowwindow
Platform surface creation via raw-window-handle. Interop between kazan and raw_window_handle.

Macros§

define_extension_set
Defines an extension set type with a built-in extension table and index lookup.
match_in_struct
Given an immutable raw pointer to a type with an s_type member such as BaseInStructure, match on a set of Vulkan structures. The struct will be rebound to the given variable of the type of the given Vulkan structure.
match_out_struct
Given a mutable raw pointer to a type with an s_type member such as BaseOutStructure, match on a set of Vulkan structures. The struct will be rebound to the given variable of the type of the given Vulkan structure.

Structs§

ArrayCStr
A fixed-size, NUL-terminated C string stored inline in an array of N bytes.
CStrTooLargeForStaticArray
Error returned when a CStr is too large for a fixed-size c_char array.
DeviceExtensionSet
Entry
InstanceExtensionSet
MissingEntryPointError
StaticFn
UnknownExtensionError
Error returned when an unknown extension name is passed to an extension set.

Enums§

SliceOrLen
An array parameter where the length is meaningful even without data.

Traits§

EnumerateInto
Output buffer for Vulkan two-call enumerate commands.
LoadDeviceFn
Trait for dispatch tables loaded via vkGetDeviceProcAddr.
LoadInstanceFn
Trait for dispatch tables loaded via vkGetInstanceProcAddr.
RawMutPtr
Converts an optional mutable reference to a raw mutable pointer, returning null for None.
RawPtr
Converts an optional reference to a raw const pointer, returning null for None.

Type Aliases§

DWORD
Display
GgpFrameToken
GgpStreamDescriptor
HANDLE
HINSTANCE
HMONITOR
HWND
IDirectFB
IDirectFBSurface
LPCWSTR
NvSciBufAttrList
NvSciBufObj
NvSciSyncAttrList
NvSciSyncFence
NvSciSyncObj
RROutput
Result
Convenience alias for Result<T, vk::Result>.
SECURITY_ATTRIBUTES
VisualID
Window
_screen_buffer
_screen_context
_screen_window
ubm_device
ubm_surface
wl_display
wl_surface
xcb_connection_t
xcb_visualid_t
xcb_window_t
zx_handle_t