mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-21 02:18:32 +00:00
Remove unnecessary extra module
Glium support is already in lib.rs
This commit is contained in:
parent
157b7fed6b
commit
1a42c45373
@ -1,26 +0,0 @@
|
||||
use glium::vertex::{Attribute, AttributeType};
|
||||
use libc::c_float;
|
||||
use std::mem;
|
||||
|
||||
unsafe impl Attribute for ImVec2 {
|
||||
fn get_type() -> AttributeType { <(c_float, c_float) as Attribute>::get_type() }
|
||||
}
|
||||
|
||||
unsafe impl Attribute for ImVec4 {
|
||||
fn get_type() -> AttributeType {
|
||||
<(c_float, c_float, c_float, c_float) as Attribute>::get_type()
|
||||
}
|
||||
}
|
||||
|
||||
impl Vertex for ImDrawVert {
|
||||
fn build_bindings() -> VertexFormat {
|
||||
unsafe {
|
||||
let dummy: &ImDrawVert = mem::transmute(0usize);
|
||||
Cow::Owned(vec![
|
||||
("pos".into(), mem::transmute(&dummy.pos), <ImVec2 as Attribute>::get_type()),
|
||||
("uv".into(), mem::transmute(&dummy.uv), <ImVec2 as Attribute>::get_type()),
|
||||
("col".into(), mem::transmute(&dummy.col), AttributeType::U8U8U8U8)
|
||||
])
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user