mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Auto merge of #25545 - szeged:mmatyas__webgl_fns_versions, r=jdm
Add WebGL2 specific version strings Updated the `VERSION` and `SHADING_LANGUAGE_VERSION` WebGL parameters to report the correct version strings when WebGL2 is in use. See: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.2 <!-- Please describe your changes on the following line: --> cc @jdm @zakorgy @imiklos --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
893fce1374
2 changed files with 10 additions and 7 deletions
|
@ -443,6 +443,16 @@ impl WebGL2RenderingContextMethods for WebGL2RenderingContext {
|
|||
/// https://www.khronos.org/registry/webgl/specs/latest/1.0/#5.14.3
|
||||
fn GetParameter(&self, cx: JSContext, parameter: u32) -> JSVal {
|
||||
match parameter {
|
||||
constants::VERSION => unsafe {
|
||||
rooted!(in(*cx) let mut rval = UndefinedValue());
|
||||
"WebGL 2.0".to_jsval(*cx, rval.handle_mut());
|
||||
return rval.get();
|
||||
},
|
||||
constants::SHADING_LANGUAGE_VERSION => unsafe {
|
||||
rooted!(in(*cx) let mut rval = UndefinedValue());
|
||||
"WebGL GLSL ES 3.00".to_jsval(*cx, rval.handle_mut());
|
||||
return rval.get();
|
||||
},
|
||||
constants::MAX_CLIENT_WAIT_TIMEOUT_WEBGL => {
|
||||
return Int32Value(
|
||||
self.base.limits().max_client_wait_timeout_webgl.as_nanos() as i32
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue