mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement instanced WebGL drawing calls (part of #20791)
This commit is contained in:
parent
0aefffc5bf
commit
4e6eea221a
12 changed files with 432 additions and 125 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue