Portal:OpenGL Objects/Query Objects: Difference between revisions
Portal for query objects. |
m Bot: Updating section links to use redirects. |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
A '''Query Object''' represents certain kinds of state, where accessing the state directly would | A '''Query Object''' represents certain kinds of state, where accessing the state directly would cause severe [[Synchronization|synchronization problems]] or degraded performance. So a query object thus represents a result that is not necessarily available yet. Most of these queries are based on rendering operations that happen [[Query Object Scope|within a specific, defined boundary]]. | ||
There are a number of types of queries. There are queries for [[ | There are a number of types of queries. There are queries for [[Occlusion Query|how many samples in a particular rendering operation passed]] all of the various [[Per-Sample Processing|post-fragment processing tests]] and the [[Fragment Shader]] itself. That is, how much of a rendered object is visible (if any). There are queries for [[Timer Query|how long the GPU took to execute some set of commands]]. And there are queries for [[Primitive Query|how many primitives were written]] by a [[Transform Feedback]] operation. | ||
Like textures, the type of query object is assigned the first time the query object is used. Unlike textures and other OpenGL objects, query objects are never "bound". Because query operations are scoped, query objects use a special begin/end pair of functions. These functions define the type of the query object. Using an existing query object with the wrong type is an error. |
Latest revision as of 06:11, 12 April 2015
A Query Object represents certain kinds of state, where accessing the state directly would cause severe synchronization problems or degraded performance. So a query object thus represents a result that is not necessarily available yet. Most of these queries are based on rendering operations that happen within a specific, defined boundary.
There are a number of types of queries. There are queries for how many samples in a particular rendering operation passed all of the various post-fragment processing tests and the Fragment Shader itself. That is, how much of a rendered object is visible (if any). There are queries for how long the GPU took to execute some set of commands. And there are queries for how many primitives were written by a Transform Feedback operation.
Like textures, the type of query object is assigned the first time the query object is used. Unlike textures and other OpenGL objects, query objects are never "bound". Because query operations are scoped, query objects use a special begin/end pair of functions. These functions define the type of the query object. Using an existing query object with the wrong type is an error.