Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
5 changes: 5 additions & 0 deletions src/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
7 changes: 7 additions & 0 deletions src/web_sys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down