mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-11 21:48:36 +00:00
Revert "Move hello_gfx example under the gfx renderer crate"
This reverts commit 9b257b9ab60f7f844df6ad219d6d54bfa1047e6e.
This commit is contained in:
parent
9b257b9ab6
commit
85f18abeee
@ -9,8 +9,11 @@ license = "MIT/Apache-2.0"
|
||||
publish = false
|
||||
|
||||
[dev-dependencies]
|
||||
gfx = "0.16"
|
||||
gfx_window_glutin = "0.18"
|
||||
glium = { version = "0.18", default-features = true }
|
||||
glutin = "0.10"
|
||||
imgui = { version = "0.0.17-pre", path = "../" }
|
||||
imgui-gfx-renderer = { version = "0.0.17-pre", path = "../imgui-gfx-renderer" }
|
||||
imgui-glium-renderer = { version = "0.0.17-pre", path = "../imgui-glium-renderer" }
|
||||
imgui-sys = { version = "0.0.17-pre", path = "../imgui-sys", features = ["glium"] }
|
||||
imgui-sys = { version = "0.0.17-pre", path = "../imgui-sys", features = ["gfx", "glium"] }
|
||||
|
||||
@ -7,11 +7,11 @@ extern crate imgui_gfx_renderer;
|
||||
|
||||
use imgui::*;
|
||||
|
||||
mod support;
|
||||
mod support_gfx;
|
||||
|
||||
const CLEAR_COLOR: [f32; 4] = [1.0, 1.0, 1.0, 1.0];
|
||||
|
||||
fn main() { support::run("hello_gfx.rs".to_owned(), CLEAR_COLOR, hello_world); }
|
||||
fn main() { support_gfx::run("hello_gfx.rs".to_owned(), CLEAR_COLOR, hello_world); }
|
||||
|
||||
fn hello_world<'a>(ui: &Ui<'a>) -> bool {
|
||||
ui.window(im_str!("Hello world"))
|
||||
@ -46,7 +46,6 @@ pub fn run<F: FnMut(&Ui) -> bool>(title: String, clear_color: [f32; 4], mut run_
|
||||
};
|
||||
|
||||
let mut imgui = ImGui::init();
|
||||
imgui.set_ini_filename(None);
|
||||
let mut renderer = Renderer::init(&mut imgui, &mut factory, shaders, main_color.clone())
|
||||
.expect("Failed to initialize renderer");
|
||||
|
||||
@ -13,9 +13,5 @@ travis-ci = { repository = "Gekkio/imgui-rs" }
|
||||
|
||||
[dependencies]
|
||||
gfx = "0.16"
|
||||
glutin = "0.10"
|
||||
imgui = { version = "0.0.17-pre", path = "../" }
|
||||
imgui-sys = { version = "0.0.17-pre", path = "../imgui-sys", features = ["gfx"] }
|
||||
|
||||
[dev-dependencies]
|
||||
gfx_window_glutin = "0.18"
|
||||
|
||||
@ -38,10 +38,7 @@ gfx_defines!{
|
||||
vertex_buffer: gfx::VertexBuffer<ImDrawVert> = (),
|
||||
matrix: gfx::Global<[[f32; 4]; 4]> = "matrix",
|
||||
tex: gfx::TextureSampler<[f32; 4]> = "tex",
|
||||
out: gfx::BlendTarget<gfx::format::Rgba8> = (
|
||||
"Target0", gfx::state::MASK_ALL,
|
||||
gfx::preset::blend::ALPHA
|
||||
),
|
||||
out: gfx::BlendTarget<gfx::format::Rgba8> = ("Target0", gfx::state::MASK_ALL, gfx::preset::blend::ALPHA),
|
||||
scissor: gfx::Scissor = (),
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user