mirror of
https://github.com/servo/servo.git
synced 2025-07-23 23:33:43 +01:00
Properly clamp arguments to WebGLRenderingContext.depthRange
This commit is contained in:
parent
7b4d66b621
commit
fb290e9c9e
3 changed files with 6 additions and 10 deletions
|
@ -695,8 +695,9 @@ impl WebGLImpl {
|
|||
ctx.gl().depth_func(func),
|
||||
WebGLCommand::DepthMask(flag) =>
|
||||
ctx.gl().depth_mask(flag),
|
||||
WebGLCommand::DepthRange(near, far) =>
|
||||
ctx.gl().depth_range(near, far),
|
||||
WebGLCommand::DepthRange(near, far) => {
|
||||
ctx.gl().depth_range(near.max(0.).min(1.) as f64, far.max(0.).min(1.) as f64)
|
||||
}
|
||||
WebGLCommand::Disable(cap) =>
|
||||
ctx.gl().disable(cap),
|
||||
WebGLCommand::Enable(cap) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue