Add WebGL compatibility

This commit is contained in:
schmelczerandras 2020-09-22 16:41:59 +02:00
parent 3725f56c78
commit 1d4980ae28
29 changed files with 567 additions and 212 deletions

View file

@ -1,3 +1,4 @@
import { UniversalRenderingContext } from '../universal-rendering-context';
import { enableExtension } from './enable-extension';
enum StopwatchState {
@ -13,7 +14,7 @@ export class WebGlStopwatch {
private timerExtension: any;
private timerQuery?: WebGLQuery;
constructor(private gl: WebGL2RenderingContext) {
constructor(private gl: UniversalRenderingContext) {
this.timerExtension = enableExtension(gl, 'EXT_disjoint_timer_query_webgl2');
}