Implement WebGL GetRenderbufferParameter

This needed a bump of gleam to version 0.4.33
This commit is contained in:
Fausto Núñez Alberro 2018-04-12 14:24:51 +02:00
parent 05fe8fa08d
commit 58760d91d1
No known key found for this signature in database
GPG key ID: 475A94D9B398B2DF
8 changed files with 158 additions and 129 deletions

View file

@ -754,6 +754,8 @@ impl WebGLImpl {
Self::active_uniform(ctx.gl(), program_id, index, chan),
WebGLCommand::GetAttribLocation(program_id, name, chan) =>
Self::attrib_location(ctx.gl(), program_id, name, chan),
WebGLCommand::GetRenderbufferParameter(target, pname, chan) =>
Self::get_renderbuffer_parameter(ctx.gl(), target, pname, chan),
WebGLCommand::GetFramebufferAttachmentParameter(target, attachment, pname, chan) =>
Self::get_framebuffer_attachment_parameter(ctx.gl(), target, attachment, pname, chan),
WebGLCommand::GetVertexAttrib(index, pname, chan) =>
@ -1188,6 +1190,17 @@ impl WebGLImpl {
chan.send(parameter).unwrap();
}
// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.7
fn get_renderbuffer_parameter(
gl: &gl::Gl,
target: u32,
pname: u32,
chan: WebGLSender<i32>
) {
let parameter = gl.get_renderbuffer_parameter_iv(target, pname);
chan.send(parameter).unwrap();
}
fn uniform_location(gl: &gl::Gl,
program_id: WebGLProgramId,
name: String,