EXT_disjoint_timer_query.getQueryObjectEXT() 方法在 WebGL API returns the state of a query object.

句法

any ext.getQueryObjectEXT(query, pname);
					

参数

query
WebGLQuery object from which to return information.
pname
A GLenum specifying which information to return. Must be ext.QUERY_RESULT_EXT or ext.QUERY_RESULT_AVAILABLE_EXT .

返回值

Depends on pname :

  • pname is ext.QUERY_RESULT_EXT : A GLuint64EXT containing the query result.
  • pname is ext.QUERY_RESULT_AVAILABLE_EXT : A GLboolean indicating whether or not a query result is available.

范例

var ext = gl.getExtension('EXT_disjoint_timer_query');
var query = ext.createQueryEXT();
ext.beginQueryEXT(ext.TIME_ELAPSED_EXT, query);
// ... drawing ...
ext.endQueryEXT(ext.TIME_ELAPSED_EXT);
// At some point in the future, after returning control to the browser
var available = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_AVAILABLE_EXT);
var disjoint = gl.getParameter(ext.GPU_DISJOINT_EXT);
if (available && !disjoint) {
  // See how much time the rendering of the object took in nanoseconds.
  var timeElapsed = ext.getQueryObjectEXT(query, ext.QUERY_RESULT_EXT);
}
					

规范

规范 状态 注释
EXT_disjoint_timer_query
The definition of 'EXT_disjoint_timer_query' in that specification.
工作草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
getQueryObjectEXT Chrome 47 — 65
不支持 47 — 65
Removed due to the GLitch exploit .
Edge No
不支持 No
Removed due to the GLitch exploit .
Firefox 51 — 63
不支持 51 — 63
Removed due to the GLitch exploit .
IE ? Opera ? Safari ? WebView Android 47 — 65
不支持 47 — 65
Removed due to the GLitch exploit .
Chrome Android 47 — 65
不支持 47 — 65
Removed due to the GLitch exploit .
Firefox Android No Opera Android ? Safari iOS ? Samsung Internet Android 5.0 — 9.0
不支持 5.0 — 9.0
Removed due to the GLitch exploit .

图例

不支持

不支持

兼容性未知 ?

兼容性未知

见实现注意事项。

另请参阅

元数据

  • 最后修改: