aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webgl2renderingcontext.rs
diff options
context:
space:
mode:
authorMátyás Mustoha <matyas.mustoha@h-lab.eu>2020-02-13 14:14:19 +0100
committerMátyás Mustoha <matyas.mustoha@h-lab.eu>2020-02-14 11:03:28 +0100
commit833485887e9e8a4ae4beb71c473df101a4106ee4 (patch)
tree534ddad4084eff694d31e838af8e8c8100b381a1 /components/script/dom/webgl2renderingcontext.rs
parent43c558fa597901f30f6994e2d99858f2954fdce2 (diff)
downloadservo-833485887e9e8a4ae4beb71c473df101a4106ee4.tar.gz
servo-833485887e9e8a4ae4beb71c473df101a4106ee4.zip
Add support for WebGL2 `MAX_COLOR_ATTACHMENTS` and `MAX_DRAW_BUFFERS`
Adds support for using the WebGL2 enums `MAX_COLOR_ATTACHMENTS` and `MAX_DRAW_BUFFERS` with `GetParameter`. See https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2
Diffstat (limited to 'components/script/dom/webgl2renderingcontext.rs')
-rw-r--r--components/script/dom/webgl2renderingcontext.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/components/script/dom/webgl2renderingcontext.rs b/components/script/dom/webgl2renderingcontext.rs
index 2d782d8604f..71f1f108b39 100644
--- a/components/script/dom/webgl2renderingcontext.rs
+++ b/components/script/dom/webgl2renderingcontext.rs
@@ -535,6 +535,8 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
constants::UNIFORM_BUFFER_OFFSET_ALIGNMENT => {
Some(self.base.limits().uniform_buffer_offset_alignment)
},
+ constants::MAX_COLOR_ATTACHMENTS => Some(self.base.limits().max_color_attachments),
+ constants::MAX_DRAW_BUFFERS => Some(self.base.limits().max_draw_buffers),
_ => None,
};
if let Some(limit) = limit {