mirror of
https://github.com/servo/servo.git
synced 2025-07-24 07:40:27 +01:00
Make gl.useProgram(null) do the right thing
This commit is contained in:
parent
fc593c68c5
commit
15389586d9
5 changed files with 9 additions and 23 deletions
|
@ -826,8 +826,6 @@ impl WebGLImpl {
|
|||
ctx.gl().uniform_matrix_3fv(uniform_id, transpose, v),
|
||||
WebGLCommand::UniformMatrix4fv(uniform_id, transpose, ref v) =>
|
||||
ctx.gl().uniform_matrix_4fv(uniform_id, transpose, v),
|
||||
WebGLCommand::UseProgram(program_id) =>
|
||||
ctx.gl().use_program(program_id.get()),
|
||||
WebGLCommand::ValidateProgram(program_id) =>
|
||||
ctx.gl().validate_program(program_id.get()),
|
||||
WebGLCommand::VertexAttrib(attrib_id, x, y, z, w) =>
|
||||
|
@ -965,6 +963,9 @@ impl WebGLImpl {
|
|||
WebGLCommand::LinkProgram(program_id, ref sender) => {
|
||||
return sender.send(Self::link_program(ctx.gl(), program_id)).unwrap();
|
||||
}
|
||||
WebGLCommand::UseProgram(program_id) => {
|
||||
ctx.gl().use_program(program_id.map_or(0, |p| p.get()))
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: update test expectations in order to enable debug assertions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue