Implement WebGL scissor method

This commit is contained in:
David Zbarsky 2015-12-15 20:43:38 -08:00
parent 59a3544279
commit 6a72d4dd12
4 changed files with 11 additions and 1 deletions

View file

@ -906,6 +906,13 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
.unwrap()
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.4
fn Scissor(&self, x: i32, y: i32, width: i32, height: i32) {
self.ipc_renderer
.send(CanvasMsg::WebGL(CanvasWebGLMsg::Scissor(x, y, width, height)))
.unwrap()
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.9
fn LinkProgram(&self, program: Option<&WebGLProgram>) {
if let Some(program) = program {