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
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. |
工作草案 | 初始定义。 |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
更新 GitHub 上的兼容性数据| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
getQueryObjectEXT
|
Chrome
47 — 65
|
Edge
No
|
Firefox
51 — 63
|
IE ? | Opera ? | Safari ? |
WebView Android
47 — 65
|
Chrome Android
47 — 65
|
Firefox Android No | Opera Android ? | Safari iOS ? |
Samsung Internet Android
5.0 — 9.0
|
不支持
兼容性未知
见实现注意事项。
EXT_disjoint_timer_query
beginQueryEXT()
createQueryEXT()
deleteQueryEXT()
endQueryEXT()
getQueryEXT()
getQueryObjectEXT()
isQueryEXT()
queryCounterEXT()
ANGLE_instanced_arrays
EXT_blend_minmax
EXT_color_buffer_half_float
EXT_frag_depth
EXT_sRGB
EXT_shader_texture_lod
EXT_texture_filter_anisotropic
OES_element_index_uint
OES_standard_derivatives
OES_texture_float
OES_texture_float_linear
OES_texture_half_float
OES_texture_half_float_linear
OES_vertex_array_object
WEBGL_color_buffer_float
WEBGL_compressed_texture_atc
WEBGL_compressed_texture_etc1
WEBGL_compressed_texture_pvrtc
WEBGL_compressed_texture_s3tc
WEBGL_compressed_texture_s3tc_srgb
WEBGL_debug_renderer_info
WEBGL_debug_shaders
WEBGL_depth_texture
WEBGL_draw_buffers
WEBGL_lose_context
WebGL2RenderingContext
WebGLActiveInfo
WebGLBuffer
WebGLContextEvent
WebGLFramebuffer
WebGLObject
WebGLProgram
WebGLQuery
WebGLRenderbuffer
WebGLRenderingContext
WebGLSampler
WebGLShader
WebGLShaderPrecisionFormat
WebGLSync
WebGLTexture
WebGLTransformFeedback
WebGLUniformLocation
WebGLVertexArrayObject