Struct webgl_stdweb::EXT_disjoint_timer_query
source · pub struct EXT_disjoint_timer_query(_);
Expand description
Extension
Specifies that queries’ results only become available at certain well-defined times. This extension provides a query mechanism that can be used to determine the amount of time it takes to fully complete a set of GL commands, and without stalling the rendering pipeline. It uses the query object mechanisms first introduced in the occlusion query extension, which allow time intervals to be polled asynchronously by the application. This version of the disjoint_timer_query extension is exposed only on on WebGL 1.0 contexts. See the _webgl2 version of the extension for how it is exposed on WebGL 2.0 contexts.
Implementations
sourceimpl EXT_disjoint_timer_query
impl EXT_disjoint_timer_query
pub const CURRENT_QUERY_EXT: GLenum = 34_917u32
pub const GPU_DISJOINT_EXT: GLenum = 36_795u32
pub const QUERY_COUNTER_BITS_EXT: GLenum = 34_916u32
pub const QUERY_RESULT_AVAILABLE_EXT: GLenum = 34_919u32
pub const QUERY_RESULT_EXT: GLenum = 34_918u32
pub const TIMESTAMP_EXT: GLenum = 36_392u32
pub const TIME_ELAPSED_EXT: GLenum = 35_007u32
sourcepub fn begin_query_ext(&self, target: GLenum, query: &WebGLTimerQueryEXT)
pub fn begin_query_ext(&self, target: GLenum, query: &WebGLTimerQueryEXT)
target accepts TIME_ELAPSED_EXT.
sourcepub fn create_query_ext(&self) -> Option<WebGLTimerQueryEXT>
pub fn create_query_ext(&self) -> Option<WebGLTimerQueryEXT>
sourcepub fn delete_query_ext(&self, query: Option<&WebGLTimerQueryEXT>)
pub fn delete_query_ext(&self, query: Option<&WebGLTimerQueryEXT>)
sourcepub fn end_query_ext(&self, target: GLenum)
pub fn end_query_ext(&self, target: GLenum)
target accepts TIME_ELAPSED_EXT.
sourcepub fn get_query_ext(&self, target: GLenum, pname: GLenum) -> Value
pub fn get_query_ext(&self, target: GLenum, pname: GLenum) -> Value
target and pname accept the following combinations of parameters. The return type of this method depends on the parameter queried. targetpnamereturned type TIME_ELAPSED_EXTCURRENT_QUERYWebGLQuery? TIMESTAMP_EXTCURRENT_QUERYnull TIME_ELAPSED_EXTQUERY_COUNTER_BITS_EXTGLint TIMESTAMP_EXTQUERY_COUNTER_BITS_EXTGLint
sourcepub fn get_query_object_ext(
&self,
query: &WebGLTimerQueryEXT,
pname: GLenum
) -> Value
pub fn get_query_object_ext(
&self,
query: &WebGLTimerQueryEXT,
pname: GLenum
) -> Value
pname accepts QUERY_RESULT_EXT or QUERY_RESULT_AVAILABLE_EXT. The return type of this method depends on the parameter queried: pnamereturned type QUERY_RESULT_EXTGLuint64EXT QUERY_RESULT_AVAILABLE_EXTboolean In order to ensure consistent behavior across platforms, queries’ results must only be made available when the user agent’s event loop is not executing a task. In other words:
- A query’s result must not be made available until control has returned to the user agent’s main loop.
- Repeatedly fetching a query’s QUERY_RESULT_AVAILABLE_EXT parameter in a loop, without returning control to the user agent, must always return the same value.
A query’s result may or may not be made available when control returns to the user agent’s event loop. It is not guaranteed that using a single setTimeout callback with a delay of 0, or a single requestAnimationFrame callback, will allow sufficient time for the WebGL implementation to supply the query’s results.
This change compared to the original extension specification is enforced in order to prevent applications from relying on being able to issue a query and fetch its result in the same frame. In order to ensure best portability among devices and best performance among implementations, applications must expect that queries’ results will become available asynchronously.
sourcepub fn is_query_ext(&self, query: Option<&WebGLTimerQueryEXT>) -> bool
pub fn is_query_ext(&self, query: Option<&WebGLTimerQueryEXT>) -> bool
Returns true if the passed WebGLTimerQueryEXT is valid and false otherwise. Returns false if the query’s invalidated flag is set.
sourcepub fn query_counter_ext(&self, query: &WebGLTimerQueryEXT, target: GLenum)
pub fn query_counter_ext(&self, query: &WebGLTimerQueryEXT, target: GLenum)
target accepts TIMESTAMP_EXT.
Trait Implementations
sourceimpl AsRef<Reference> for EXT_disjoint_timer_query
impl AsRef<Reference> for EXT_disjoint_timer_query
sourceimpl Clone for EXT_disjoint_timer_query
impl Clone for EXT_disjoint_timer_query
sourcefn clone(&self) -> EXT_disjoint_timer_query
fn clone(&self) -> EXT_disjoint_timer_query
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for EXT_disjoint_timer_query
impl Debug for EXT_disjoint_timer_query
sourceimpl Extension for EXT_disjoint_timer_query
impl Extension for EXT_disjoint_timer_query
sourceimpl From<EXT_disjoint_timer_query> for Reference
impl From<EXT_disjoint_timer_query> for Reference
sourcefn from(value: EXT_disjoint_timer_query) -> Self
fn from(value: EXT_disjoint_timer_query) -> Self
sourceimpl InstanceOf for EXT_disjoint_timer_query
impl InstanceOf for EXT_disjoint_timer_query
sourcefn instance_of(_reference: &Reference) -> bool
fn instance_of(_reference: &Reference) -> bool
Self
.