Merge pull request #4 from juancampa/no-aa-depth

Disable antialiasing and depth buffer for WebGL2 contexts
This commit is contained in:
Daniel Imms
2019-01-15 15:56:45 -08:00
committed by GitHub
+2 -1
View File
@@ -82,7 +82,8 @@ export class WebglRenderer extends EventEmitter implements IRenderer {
this._renderDebouncer = new RenderDebouncer(this._terminal, this._renderRows.bind(this));
this._canvas = document.createElement('canvas');
this._gl = this._canvas.getContext('webgl2') as IWebGL2RenderingContext;
const contextAttributes = { antialias: false, depth: false };
this._gl = this._canvas.getContext('webgl2', contextAttributes) as IWebGL2RenderingContext;
if (!this._gl) {
throw new Error('WebGL2 not supported');
}