mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement WebGL GetRenderbufferParameter
This needed a bump of gleam to version 0.4.33
This commit is contained in:
parent
05fe8fa08d
commit
58760d91d1
8 changed files with 158 additions and 129 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue