imgui-dx9-renderer

Crates.ioimgui-dx9-renderer
lib.rsimgui-dx9-renderer
version0.10.0
sourcesrc
created_at2019-06-02 15:55:39.380503
updated_at2023-03-05 15:38:39.608118
descriptionDirectX 9 renderer for the imgui crate
homepagehttps://github.com/Veykril/imgui-dx9-renderer
repositoryhttps://github.com/Veykril/imgui-dx9-renderer
max_upload_size
id138519
size63,378
Lukas Wirth (Veykril)

documentation

README

imgui-dx9-renderer

Documentation Version

DirectX 9 renderer for imgui-rs.

Usage

This crate makes use of the ComPtr wrapper of the wio crate. You have to either wrap your device pointer in one to pass it to the renderer new constructor or pass it to new_raw which will increment the ref count for you.

let device: *mut IDirect3DDevice9 = /* */;

let mut renderer = unsafe {
    imgui_dx9_renderer::Renderer::new(&mut imgui, wio::com::ComPtr::from_raw(device)).unwrap()
};
// or 
let mut renderer = unsafe {
    imgui_dx9_renderer::Renderer::new_raw(&mut imgui, device).unwrap()
};

Then in your rendering loop it's as easy as calling renderer.render(ui.render()).

Documentation

The crate is documented but imgui-rs doesn't currently build on docs.rs for the windows target. Due to this one has to either build it themselves or look into the source itself.

License

Licensed under the MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)

Commit count: 44

cargo fmt