Add more improvements

This commit is contained in:
schmelczerandras 2020-09-16 14:45:08 +02:00
parent e1c74a8054
commit bc16bdd62e
29 changed files with 288 additions and 160 deletions

View file

@ -1,11 +1,13 @@
import { Insights } from '../../rendering/insights';
const extensions: Map<string, any> = new Map();
const printExtensions = () => {
const logExtensions = () => {
const values = {};
for (const [k, v] of extensions.entries()) {
values[k] = v !== null;
}
//InfoText.modifyRecord('extensions', values);
Insights.setValue('extensions', values);
};
export const tryEnableExtension = (
@ -23,7 +25,7 @@ export const tryEnableExtension = (
extensions.set(name, extension);
printExtensions();
logExtensions();
return extension;
};

View file

@ -1,3 +1,4 @@
import { Insights } from '../../rendering/insights';
import { enableExtension } from './enable-extension';
// https://www.khronos.org/registry/webgl/extensions/EXT_disjoint_timer_query_webgl2/
@ -37,7 +38,7 @@ export class WebGlStopwatch {
this.gl.QUERY_RESULT
);
//InfoText.modifyRecord('Draw time', `${this.resultsInMilliSeconds.toFixed(2)} ms`);
Insights.setValue('GPU draw time', `${this.resultsInMilliSeconds.toFixed(2)} ms`);
this.isReady = true;
}