#imgui #renderer #directx #constructor #dx9

imgui-dx9-renderer

DirectX 9 renderer for the imgui crate

8 releases (4 breaking)

0.5.0 Sep 20, 2020
0.4.0 Jun 23, 2020
0.3.3 Feb 19, 2020
0.3.2 Sep 27, 2019
0.1.0 Jun 2, 2019

#84 in GUI

Download history 62/week @ 2020-07-02 66/week @ 2020-07-09 28/week @ 2020-07-16 47/week @ 2020-07-23 19/week @ 2020-07-30 38/week @ 2020-08-06 42/week @ 2020-08-13 33/week @ 2020-08-20 40/week @ 2020-08-27 40/week @ 2020-09-03 11/week @ 2020-09-10 32/week @ 2020-09-17 32/week @ 2020-09-24 22/week @ 2020-10-01 28/week @ 2020-10-08 30/week @ 2020-10-15

156 downloads per month

MIT license

20KB
375 lines

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)

Dependencies

~5MB
~94K SLoC