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:
Anthony Ramine 2018-04-09 11:46:12 +02:00
parent e460b4ab8a
commit 68898f4ebd

View file

@ -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));