Cache BUFFER_USAGE value on the DOM side

This commit is contained in:
Anthony Ramine 2018-04-04 15:26:08 +02:00
parent e06f0d32d0
commit ae286a518d
4 changed files with 16 additions and 31 deletions

View file

@ -758,8 +758,6 @@ impl WebGLImpl {
Self::vertex_attrib(ctx.gl(), index, pname, chan),
WebGLCommand::GetVertexAttribOffset(index, pname, chan) =>
Self::vertex_attrib_offset(ctx.gl(), index, pname, chan),
WebGLCommand::GetBufferParameter(target, param_id, chan) =>
Self::buffer_parameter(ctx.gl(), target, param_id, chan),
WebGLCommand::GetParameter(param_id, chan) =>
Self::parameter(ctx.gl(), param_id, chan),
WebGLCommand::GetTexParameter(target, pname, chan) =>
@ -1127,15 +1125,6 @@ impl WebGLImpl {
chan.send(result).unwrap();
}
fn buffer_parameter(gl: &gl::Gl,
target: u32,
param_id: u32,
chan: WebGLSender<i32>) {
let result = gl.get_buffer_parameter_iv(target, param_id);
chan.send(result).unwrap();
}
fn program_parameter(gl: &gl::Gl,
program_id: WebGLProgramId,
param_id: u32,