Simplify VertexAttribOffset

This commit is contained in:
Igor Gutorov 2018-03-20 21:08:28 +02:00
parent 431e3ddf8d
commit 0747853ad0
3 changed files with 8 additions and 8 deletions

View file

@ -1104,12 +1104,8 @@ impl WebGLImpl {
fn vertex_attrib_offset(gl: &gl::Gl,
index: u32,
pname: u32,
chan: WebGLSender<WebGLResult<isize>>) {
let result = match pname {
gl::VERTEX_ATTRIB_ARRAY_POINTER => Ok(gl.get_vertex_attrib_pointer_v(index, pname)),
_ => Err(WebGLError::InvalidEnum),
};
chan: WebGLSender<isize>) {
let result = gl.get_vertex_attrib_pointer_v(index, pname);
chan.send(result).unwrap();
}