We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d07044d commit 86f286cCopy full SHA for 86f286c
src/sdl2/render.rs
@@ -2047,6 +2047,20 @@ impl<'a> From<&'a [[i32; 3]]> for VertexIndices<'a> {
2047
}
2048
2049
2050
+macro_rules! impl_vec_ref_into_vertex_indices {
2051
+ ($($ty:ty)*) => {
2052
+ $(
2053
+ impl<'a> From<&'a Vec<$ty>> for VertexIndices<'a> {
2054
+ fn from(value: &'a Vec<$ty>) -> Self {
2055
+ Self::from(value.as_slice())
2056
+ }
2057
2058
+ )*
2059
+ };
2060
+}
2061
+
2062
+impl_vec_ref_into_vertex_indices!(u8 u16 u32 i32 [u8; 3] [u16; 3] [u32; 3] [i32; 3]);
2063
2064
#[derive(Clone, Copy)]
2065
pub struct RenderGeometryTextureParams<'a, TexCoordVertex> {
2066
#[cfg(not(feature = "unsafe_textures"))]
0 commit comments