Disable the GPU timer by default
This commit is contained in:
parent
bd1eb1102e
commit
d241f36866
4 changed files with 19 additions and 5 deletions
|
|
@ -49,7 +49,6 @@ export class WebGlStopwatch {
|
|||
this.gl.QUERY_RESULT_AVAILABLE
|
||||
);
|
||||
const disjoint = this.gl.getParameter(this.timerExtension.GPU_DISJOINT_EXT);
|
||||
|
||||
if (available && !disjoint) {
|
||||
this.resultsInNanoSeconds = this.gl.getQueryParameter(
|
||||
this.timerQuery!,
|
||||
|
|
@ -70,6 +69,10 @@ export class WebGlStopwatch {
|
|||
return this.state == StopwatchState.running;
|
||||
}
|
||||
|
||||
public get isWaitingForResults(): boolean {
|
||||
return this.state == StopwatchState.waitingForResults;
|
||||
}
|
||||
|
||||
public get resultsInMilliSeconds(): number {
|
||||
return this.resultsInNanoSeconds! / 1000 / 1000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue