mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-13 14:38:36 +00:00
Reorganize glium support and renderer
This commit is contained in:
parent
f3a243adcf
commit
87b31d6601
@ -8,6 +8,11 @@
|
||||
- `ImVec4::zero()`
|
||||
- `Into` array and tuple conversions for ImVec2 and ImVec4
|
||||
|
||||
### Changed
|
||||
|
||||
- imgui-sys no longer includes glium support by default
|
||||
- Move Glium renderer to a separate crate
|
||||
|
||||
### Removed
|
||||
|
||||
- `Window::always_vertical_scollbar` (typo)
|
||||
|
||||
22
Cargo.toml
22
Cargo.toml
@ -8,21 +8,9 @@ homepage = "https://github.com/gekkio/imgui-rs"
|
||||
repository = "https://github.com/gekkio/imgui-rs"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[features]
|
||||
default = ["glium"]
|
||||
[dependencies]
|
||||
imgui-sys = { path = "imgui-sys" }
|
||||
|
||||
[dependencies.glium]
|
||||
version = "0.16"
|
||||
default-features = false
|
||||
optional = true
|
||||
|
||||
[dependencies.imgui-sys]
|
||||
path = "imgui-sys"
|
||||
|
||||
[build-dependencies]
|
||||
gcc = "0.3"
|
||||
|
||||
[dev-dependencies.glium]
|
||||
version = "0.16"
|
||||
features = ["glutin"]
|
||||
default-features = false
|
||||
[dev-dependencies]
|
||||
glium = "0.16"
|
||||
imgui-glium-renderer = { path = "imgui-glium-renderer" }
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
extern crate glium;
|
||||
#[macro_use]
|
||||
extern crate imgui;
|
||||
extern crate imgui_glium_renderer;
|
||||
|
||||
use imgui::*;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ use glium::backend::glutin_backend::GlutinFacade;
|
||||
use glium::glutin;
|
||||
use glium::glutin::{ElementState, Event, MouseButton, MouseScrollDelta, VirtualKeyCode, TouchPhase};
|
||||
use imgui::{ImGui, Ui, ImGuiKey};
|
||||
use imgui::glium_renderer::Renderer;
|
||||
use imgui_glium_renderer::Renderer;
|
||||
use std::time::Instant;
|
||||
|
||||
pub struct Support {
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
extern crate glium;
|
||||
#[macro_use]
|
||||
extern crate imgui;
|
||||
extern crate imgui_glium_renderer;
|
||||
|
||||
use self::support::Support;
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
extern crate glium;
|
||||
#[macro_use]
|
||||
extern crate imgui;
|
||||
extern crate imgui_glium_renderer;
|
||||
|
||||
use imgui::*;
|
||||
use std::iter::repeat;
|
||||
|
||||
13
imgui-glium-renderer/Cargo.toml
Normal file
13
imgui-glium-renderer/Cargo.toml
Normal file
@ -0,0 +1,13 @@
|
||||
[package]
|
||||
name = "imgui-glium-renderer"
|
||||
version = "0.0.12-pre"
|
||||
authors = ["Joonas Javanainen <joonas.javanainen@gmail.com>"]
|
||||
description = "Glium renderer for imgui-rs"
|
||||
homepage = "https://github.com/gekkio/imgui-rs"
|
||||
repository = "https://github.com/gekkio/imgui-rs"
|
||||
license = "MIT"
|
||||
|
||||
[dependencies]
|
||||
glium = { version = "0.16", default-features = false }
|
||||
imgui = { path = "../" }
|
||||
imgui-sys = { path = "../imgui-sys", features = ["glium"] }
|
||||
@ -1,15 +1,18 @@
|
||||
#[macro_use]
|
||||
extern crate glium;
|
||||
extern crate imgui;
|
||||
|
||||
use glium::{DrawError, GlObject, IndexBuffer, Program, Surface, Texture2d, VertexBuffer};
|
||||
use glium::backend::{Context, Facade};
|
||||
use glium::program;
|
||||
use glium::index::{self, PrimitiveType};
|
||||
use glium::texture;
|
||||
use glium::vertex;
|
||||
use imgui::{DrawList, ImDrawIdx, ImDrawVert, ImGui, Ui};
|
||||
use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
use std::rc::Rc;
|
||||
|
||||
use super::{DrawList, ImDrawIdx, ImDrawVert, ImGui, Ui};
|
||||
|
||||
pub type RendererResult<T> = Result<T, RendererError>;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@ -8,16 +8,9 @@ repository = "https://github.com/gekkio/imgui-rs"
|
||||
license = "MIT"
|
||||
build = "build.rs"
|
||||
|
||||
[features]
|
||||
default = ["glium"]
|
||||
|
||||
[dependencies]
|
||||
bitflags = "0.8"
|
||||
|
||||
[dependencies.glium]
|
||||
version = "0.16"
|
||||
default-features = false
|
||||
optional = true
|
||||
glium = { version = "0.16", default-features = false, optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
gcc = "0.3"
|
||||
|
||||
@ -1,7 +1,3 @@
|
||||
#[cfg(feature = "glium")]
|
||||
#[macro_use]
|
||||
extern crate glium;
|
||||
|
||||
extern crate imgui_sys;
|
||||
|
||||
use std::borrow::Cow;
|
||||
@ -59,9 +55,6 @@ mod sliders;
|
||||
mod trees;
|
||||
mod window;
|
||||
|
||||
#[cfg(feature = "glium")]
|
||||
pub mod glium_renderer;
|
||||
|
||||
pub struct ImGui {
|
||||
// We need to keep ownership of the ImStr values to ensure the *const char pointer
|
||||
// lives long enough in case the ImStr contains a Cow::Owned
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user