Closed supervitas closed 5 years ago
Good catch, and thanks for filing! Do you have a webgl2 scene to test this on, or interested in making a PR?
Yeah, here it is - https://github.com/immersive-web/cardboard-vr-display/pull/35
I tested this on my scene with WebGL 2 engine
Fixed via #35 -- will be in next release
https://github.com/immersive-web/cardboard-vr-display/blob/b2fd5b03fa579fecead1b3842782d7640e8ae61f/src/cardboard-vr-display.js#L298
This dosenot work if context is WebGL2
Should be:
var gl = this.layer_.source.getContext('webgl'); if (!gl) gl = this.layer_.source.getContext('experimental-webgl'); if (!gl) gl = this.layer_.source.getContext('webgl2');