From 9f0c2fc87ccd4fcfbc53f407c71984c61ea0ebac Mon Sep 17 00:00:00 2001 From: Pierre Krieger Date: Sat, 20 Feb 2016 09:41:45 +0100 Subject: [PATCH] Add VulkanObjectU64 and VulkanObjectUsize --- vulkano/src/lib.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/vulkano/src/lib.rs b/vulkano/src/lib.rs index 878fd2c4..349ace5e 100644 --- a/vulkano/src/lib.rs +++ b/vulkano/src/lib.rs @@ -105,6 +105,21 @@ trait VulkanObject { fn internal_object(&self) -> Self::Object; } +// TODO: remove eventually +// https://github.com/rust-lang/rust/issues/29328 +trait VulkanObjectU64 { fn internal_object(&self) -> u64; } +impl VulkanObjectU64 for T where T: VulkanObject { + #[inline] + fn internal_object(&self) -> u64 { VulkanObject::internal_object(self) } +} +// TODO: remove eventually +// https://github.com/rust-lang/rust/issues/29328 +trait VulkanObjectUsize { fn internal_object(&self) -> usize; } +impl VulkanObjectUsize for T where T: VulkanObject { + #[inline] + fn internal_object(&self) -> usize { VulkanObject::internal_object(self) } +} + /// Gives access to the Vulkan function pointers stored in this object. trait VulkanPointers { /// The struct that provides access to the function pointers.