EXT_disjoint_timer_query: queryCounterEXT() method
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Phương thức EXT_disjoint_timer_query.queryCounterEXT() của WebGL API ghi lại thời gian hiện tại vào đối tượng truy vấn tương ứng.
Cú pháp
js
queryCounterEXT(query, target)
Tham số
query-
Một đối tượng
WebGLQueryđể ghi lại thời gian hiện tại. target-
Một
GLenumchỉ định target của truy vấn thời gian. Phải làext.TIMESTAMP_EXT.
Giá trị trả về
Không có (undefined).
Ví dụ
js
const ext = gl.getExtension("EXT_disjoint_timer_query");
const startQuery = ext.createQueryEXT();
const endQuery = ext.createQueryEXT();
ext.queryCounterEXT(startQuery, ext.TIMESTAMP_EXT);
// …
ext.queryCounterEXT(endQuery, ext.TIMESTAMP_EXT);
Thông số kỹ thuật
| Specification |
|---|
| WebGL EXT_disjoint_timer_query Extension Specification> |