mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Fix the error emitted for invalid targets in WebGLTexture::bind
It doesn't actually matter because this is only called from WebGLRenderingContext::BindTexture, which already checks the target, but better be safe than sorry.
This commit is contained in:
parent
e460b4ab8a
commit
68898f4ebd
1 changed files with 1 additions and 1 deletions
|
@ -109,7 +109,7 @@ impl WebGLTexture {
|
||||||
let face_count = match target {
|
let face_count = match target {
|
||||||
constants::TEXTURE_2D => 1,
|
constants::TEXTURE_2D => 1,
|
||||||
constants::TEXTURE_CUBE_MAP => 6,
|
constants::TEXTURE_CUBE_MAP => 6,
|
||||||
_ => return Err(WebGLError::InvalidOperation)
|
_ => return Err(WebGLError::InvalidEnum)
|
||||||
};
|
};
|
||||||
self.face_count.set(face_count);
|
self.face_count.set(face_count);
|
||||||
self.target.set(Some(target));
|
self.target.set(Some(target));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue