Add initial support for VertexAttribI4*, VertexAttribIPointer

Adds initial support for the WebGL2 `VertexAttribI4i`, `VertexAttribI4iv`, `VertexAttribI4ui`, `VertexAttribI4uiv` and `VertexAttribIPointer` calls.
This commit is contained in:
Istvan 2020-03-27 15:56:19 +01:00 committed by Josh Matthews
parent 5a26190fc9
commit 62f00df79d
17 changed files with 290 additions and 53 deletions

View file

@ -1297,7 +1297,6 @@ impl WebGLImpl {
WebGLCommand::GetFragDataLocation(program_id, ref name, ref sender) => {
let location =
gl.get_frag_data_location(program_id.get(), &to_name_in_compiled_shader(name));
assert!(location >= 0);
sender.send(location).unwrap();
},
WebGLCommand::GetUniformLocation(program_id, ref name, ref chan) => {
@ -1402,6 +1401,12 @@ impl WebGLImpl {
WebGLCommand::VertexAttrib(attrib_id, x, y, z, w) => {
gl.vertex_attrib_4f(attrib_id, x, y, z, w)
},
WebGLCommand::VertexAttribI(attrib_id, x, y, z, w) => {
gl.vertex_attrib_4i(attrib_id, x, y, z, w)
},
WebGLCommand::VertexAttribU(attrib_id, x, y, z, w) => {
gl.vertex_attrib_4ui(attrib_id, x, y, z, w)
},
WebGLCommand::VertexAttribPointer2f(attrib_id, size, normalized, stride, offset) => {
gl.vertex_attrib_pointer_f32(attrib_id, size, normalized, stride, offset)
},