Implement gl.getParameter(gl.UNPACK_COLORSPACE_CONVERSION_WEBGL)

This commit is contained in:
Anthony Ramine 2018-09-18 11:48:34 +02:00
parent fe6f53ffb4
commit 900c3cc6b5
2 changed files with 9 additions and 12 deletions

View file

@ -1235,7 +1235,15 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
constants::UNPACK_ALIGNMENT => {
return UInt32Value(self.texture_unpacking_alignment.get());
},
_ => {}
constants::UNPACK_COLORSPACE_CONVERSION_WEBGL => {
let unpack = self.texture_unpacking_settings.get();
return UInt32Value(if unpack.contains(TextureUnpacking::CONVERT_COLORSPACE) {
constants::BROWSER_DEFAULT_WEBGL
} else {
constants::NONE
});
},
_ => {},
}
// Handle any MAX_ parameters by retrieving the limits that were stored