imgui-vulkan-renderer-rs 0.1.1

Vulkan renderer for imgui-rs
Documentation

imgui-vulkan-renderer-rs

Vulkan renderer for Dear ImGui via the imgui Rust bindings and ash.

Pair with imgui-glfw-rs for a complete GLFW + Vulkan + Dear ImGui integration.

Usage

Add to your Cargo.toml:

[dependencies]
imgui-vulkan-renderer-rs = "0.1"

Then in your code:

use imgui::Context;
use imgui_vulkan_renderer_rs::{Renderer, RendererCreateInfo};

let mut imgui = Context::create();

let create_info = RendererCreateInfo {
    device: device.clone(),
    memory_properties: mem_props,
    render_pass,
    command_pool,
    queue,
};
let mut renderer = Renderer::new(&mut imgui, &create_info)
    .expect("Failed to initialize renderer");

// In your main loop, after building the imgui frame:
let draw_data = imgui.render();
renderer.render(draw_data, command_buffer).unwrap();

Requirements

  • Vulkan 1.0 or later
  • A valid ash::Device and compatible VkRenderPass when calling Renderer::new
  • A command buffer in the recording state inside a compatible render pass when calling Renderer::render

License

Licensed under either of

at your option.