Use a cleaner way to create a webgl context

This commit is contained in:
Olivier Guyot
2018-12-28 16:10:38 +01:00
parent 435ef3070c
commit 33c717e159

View File

@@ -18,6 +18,7 @@ import {
} from '../transform'; } from '../transform';
import {create, fromTransform} from '../vec/mat4'; import {create, fromTransform} from '../vec/mat4';
import WebGLPostProcessingPass from './PostProcessingPass'; import WebGLPostProcessingPass from './PostProcessingPass';
import {getContext} from '../webgl';
/** /**
@@ -220,7 +221,7 @@ class WebGLHelper extends Disposable {
* @private * @private
* @type {WebGLRenderingContext} * @type {WebGLRenderingContext}
*/ */
this.gl_ = this.canvas_.getContext('webgl'); this.gl_ = getContext(this.canvas_);
const gl = this.getGL(); const gl = this.getGL();
/** /**