From 1a42c453730c785215ac069b62a816079ae4e7d0 Mon Sep 17 00:00:00 2001 From: Joonas Javanainen Date: Mon, 24 Aug 2015 21:33:38 +0100 Subject: [PATCH] Remove unnecessary extra module Glium support is already in lib.rs --- imgui-sys/src/glium_support.rs | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 imgui-sys/src/glium_support.rs diff --git a/imgui-sys/src/glium_support.rs b/imgui-sys/src/glium_support.rs deleted file mode 100644 index c1dc97d..0000000 --- a/imgui-sys/src/glium_support.rs +++ /dev/null @@ -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), ::get_type()), - ("uv".into(), mem::transmute(&dummy.uv), ::get_type()), - ("col".into(), mem::transmute(&dummy.col), AttributeType::U8U8U8U8) - ]) - } - } -}