From 10438c6000b102400cbf0b31ab30b02429d4c56d Mon Sep 17 00:00:00 2001 From: Malik Olivier Boussejra Date: Sun, 12 Aug 2018 10:48:37 +0900 Subject: [PATCH] [examples] hello_gfx: Remove dependency on sys crate Before this commit, hello_gfx was dependent on sys, while it only uses sys::ImVec4, which is a type that is anyway re-exported by imgui. --- imgui-examples/Cargo.toml | 1 - imgui-examples/examples/hello_gfx.rs | 1 - imgui-examples/examples/support_gfx/mod.rs | 4 +--- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/imgui-examples/Cargo.toml b/imgui-examples/Cargo.toml index 6681172..89c8c7f 100644 --- a/imgui-examples/Cargo.toml +++ b/imgui-examples/Cargo.toml @@ -16,4 +16,3 @@ glutin = "0.17" imgui = { version = "0.0.19-pre", path = "../" } imgui-gfx-renderer = { version = "0.0.19-pre", path = "../imgui-gfx-renderer" } imgui-glium-renderer = { version = "0.0.19-pre", path = "../imgui-glium-renderer" } -imgui-sys = { version = "0.0.19-pre", path = "../imgui-sys", features = ["gfx", "glium"] } diff --git a/imgui-examples/examples/hello_gfx.rs b/imgui-examples/examples/hello_gfx.rs index f406fc3..cda16b9 100644 --- a/imgui-examples/examples/hello_gfx.rs +++ b/imgui-examples/examples/hello_gfx.rs @@ -4,7 +4,6 @@ extern crate glutin; #[macro_use] extern crate imgui; extern crate imgui_gfx_renderer; -extern crate imgui_sys; use imgui::*; diff --git a/imgui-examples/examples/support_gfx/mod.rs b/imgui-examples/examples/support_gfx/mod.rs index 80a6bff..5d03952 100644 --- a/imgui-examples/examples/support_gfx/mod.rs +++ b/imgui-examples/examples/support_gfx/mod.rs @@ -1,4 +1,4 @@ -use imgui::{FontGlyphRange, ImFontConfig, ImGui, ImGuiMouseCursor, Ui}; +use imgui::{FontGlyphRange, ImFontConfig, ImGui, ImGuiMouseCursor, ImVec4, Ui}; use imgui_gfx_renderer::{Renderer, Shaders}; use std::time::Instant; @@ -45,8 +45,6 @@ pub fn run bool>(title: String, clear_color: [f32; 4], mut run_ let mut imgui = ImGui::init(); { // Fix incorrect colors with sRGB framebuffer - use imgui_sys::ImVec4; - fn imgui_gamma_to_linear(col: ImVec4) -> ImVec4 { let x = col.x.powf(2.2); let y = col.y.powf(2.2);