Add more improvements
This commit is contained in:
parent
e1c74a8054
commit
bc16bdd62e
29 changed files with 288 additions and 160 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue