mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Properly allow FUNC_SUBTRACT and FUNC_REVERSE_SUBTRACT in blendEquation
This commit is contained in:
parent
ae286a518d
commit
15272d2c3b
1 changed files with 7 additions and 4 deletions
|
@ -1477,11 +1477,14 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
|
|||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
|
||||
fn BlendEquation(&self, mode: u32) {
|
||||
if mode != constants::FUNC_ADD {
|
||||
return self.webgl_error(InvalidEnum);
|
||||
match mode {
|
||||
constants::FUNC_ADD |
|
||||
constants::FUNC_SUBTRACT |
|
||||
constants::FUNC_REVERSE_SUBTRACT => {
|
||||
self.send_command(WebGLCommand::BlendEquation(mode))
|
||||
},
|
||||
_ => self.webgl_error(InvalidEnum)
|
||||
}
|
||||
|
||||
self.send_command(WebGLCommand::BlendEquation(mode));
|
||||
}
|
||||
|
||||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue