diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2018-03-20 10:11:46 +0100 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2018-07-08 10:44:45 +0200 |
commit | 4e6eea221a19b3e5a4b70f5954b3347bb6db02d1 (patch) | |
tree | f0dbfec03665f8fd2ea9330bfe459ee3e6bf99d2 /components/canvas/webgl_thread.rs | |
parent | 0aefffc5bfb45a1ebfe86597231d44e73b3f8e5d (diff) | |
download | servo-4e6eea221a19b3e5a4b70f5954b3347bb6db02d1.tar.gz servo-4e6eea221a19b3e5a4b70f5954b3347bb6db02d1.zip |
Implement instanced WebGL drawing calls (part of #20791)
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r-- | components/canvas/webgl_thread.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index f39d9745a91..a90c996f8bb 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -973,6 +973,15 @@ impl WebGLImpl { WebGLCommand::UseProgram(program_id) => { ctx.gl().use_program(program_id.map_or(0, |p| p.get())) } + WebGLCommand::DrawArraysInstanced { mode, first, count, primcount } => { + ctx.gl().draw_arrays_instanced(mode, first, count, primcount) + } + WebGLCommand::DrawElementsInstanced { mode, count, type_, offset, primcount } => { + ctx.gl().draw_elements_instanced(mode, count, type_, offset, primcount) + } + WebGLCommand::VertexAttribDivisor { index, divisor } => { + ctx.gl().vertex_attrib_divisor(index, divisor) + } } // TODO: update test expectations in order to enable debug assertions |