Capítulo 787 de 859

Chapter 787: WebGLTimestampQueryPool

Core Idea

Manages a pool of WebGL timestamp queries for performance measurement. Handles creation, execution, and resolution of timer queries using WebGL extensions.

Reference Tables

Constructor

Signature
`new WebGLTimestampQueryPool( gl : WebGLRenderingContext

Methods

MethodDescription
.allocateQueriesForContext( uid : string ) : numberAllocates a pair of queries for a given render context.
.beginQuery( uid : string )Begins a timestamp query for the specified render context.
.dispose()Releases all resources held by this query pool. This includes deleting all query objects and clearing internal state.
.endQuery( uid : string )Ends the active timestamp query for the specified render context.
.resolveQueriesAsync() : Promise.<number> (async)Asynchronously resolves all completed queries and returns the total duration.
.resolveQuery( query : WebGLQuery ) : Promise.<number> (async)Resolves a single query, checking for completion and disjoint operation.

Key Takeaways

  1. WebGLTimestampQueryPool extends: TimestampQueryPool
  2. Key methods: allocateQueriesForContext, beginQuery, dispose, endQuery.

Connects To