aboutsummaryrefslogtreecommitdiffstats
path: root/components/canvas/webgl_thread.rs
diff options
context:
space:
mode:
authorIstvan <istvan.miklos@h-lab.eu>2020-03-27 15:56:19 +0100
committerJosh Matthews <josh@joshmatthews.net>2020-04-07 15:01:39 -0400
commit62f00df79d8945e43c42a6100d87faefa1aa04e0 (patch)
tree81240c9653149649eb1dd40b90c7dc4da18d73e7 /components/canvas/webgl_thread.rs
parent5a26190fc9cb4b5ff3f4bf57cf1a88243c732e9e (diff)
downloadservo-62f00df79d8945e43c42a6100d87faefa1aa04e0.tar.gz
servo-62f00df79d8945e43c42a6100d87faefa1aa04e0.zip
Add initial support for VertexAttribI4*, VertexAttribIPointer
Adds initial support for the WebGL2 `VertexAttribI4i`, `VertexAttribI4iv`, `VertexAttribI4ui`, `VertexAttribI4uiv` and `VertexAttribIPointer` calls.
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r--components/canvas/webgl_thread.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs
index b7e9d1a0a17..8d63b6973f0 100644
--- a/components/canvas/webgl_thread.rs
+++ b/components/canvas/webgl_thread.rs
@@ -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)
},