diff options
author | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2018-04-12 14:24:51 +0200 |
---|---|---|
committer | Fausto Núñez Alberro <fausto.nunez@mailbox.org> | 2018-04-24 18:16:51 +0200 |
commit | 58760d91d1830ce0bd75c22ebad42c4f9e332845 (patch) | |
tree | 3200e955264b921b50b4026933bc3d4a14c94759 /components/canvas/webgl_thread.rs | |
parent | 05fe8fa08d507836ce5659ff56f83022a90b241a (diff) | |
download | servo-58760d91d1830ce0bd75c22ebad42c4f9e332845.tar.gz servo-58760d91d1830ce0bd75c22ebad42c4f9e332845.zip |
Implement WebGL GetRenderbufferParameter
This needed a bump of gleam to version 0.4.33
Diffstat (limited to 'components/canvas/webgl_thread.rs')
-rw-r--r-- | components/canvas/webgl_thread.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 247a5a5e52c..7e44f2c0d42 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -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, |