diff --git a/src/lib.rs b/src/lib.rs index 7c5680b..025846a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -772,6 +772,8 @@ pub trait HasContext { unsafe fn vertex_attrib_4_f32(&self, index: u32, x: f32, y: f32, z: f32, w: f32); + unsafe fn vertex_attrib_i_4_ui(&self, index: u32, x: u32, y: u32, z: u32, w: u32); + unsafe fn vertex_attrib_1_f32_slice(&self, index: u32, v: &[f32]); unsafe fn vertex_attrib_2_f32_slice(&self, index: u32, v: &[f32]); diff --git a/src/native.rs b/src/native.rs index 0811784..2aab0ed 100644 --- a/src/native.rs +++ b/src/native.rs @@ -1715,6 +1715,11 @@ impl HasContext for Context { gl.VertexAttrib4f(index, x, y, z, w); } + unsafe fn vertex_attrib_i_4_ui(&self, index: u32, x: u32, y: u32, z: u32, w: u32) { + let gl = &self.raw; + gl.VertexAttribI4ui(index, x, y, z, w); + } + unsafe fn vertex_attrib_1_f32_slice(&self, index: u32, v: &[f32]) { let gl = &self.raw; gl.VertexAttrib1fv(index, v.as_ptr()); diff --git a/src/web_sys.rs b/src/web_sys.rs index 7d9ce17..a584783 100644 --- a/src/web_sys.rs +++ b/src/web_sys.rs @@ -2685,6 +2685,13 @@ impl HasContext for Context { } } + unsafe fn vertex_attrib_i_4_ui(&self, index: u32, x: u32, y: u32, z: u32, w: u32) { + match self.raw { + RawRenderingContext::WebGl1(ref _gl) => panic!("glVertexAttribI4ui not supported"), + RawRenderingContext::WebGl2(ref gl) => gl.vertex_attrib_i4ui(index, x, y, z, w), + } + } + unsafe fn vertex_attrib_1_f32_slice(&self, index: u32, v: &[f32]) { match self.raw { RawRenderingContext::WebGl1(ref gl) => gl.vertex_attrib1fv_with_f32_array(index, v),