An asynchronous GPU query. More...
#include <Query.h>
Public Member Functions | |
Query (QueryType type) | |
Creates a new Query of the given type. | |
virtual | ~Query () |
Deletes this query. | |
QueryType | getType () |
Returns the type of this query. | |
GLuint | getId () |
Returns the id of this query. | |
void | begin () |
Starts this query. | |
void | end () |
Ends this query. | |
bool | available () |
Returns true if the result of this query is available. | |
GLuint64 | getResult () |
Returns the result of this query. |
An asynchronous GPU query.
A query measures some value, depending on its type, between the calls to begin() and end(). After end() has been called, the result is available asynchronously. Its availability can be tested with available(), and its value with getResult().
ork::Query::Query | ( | QueryType | type | ) |
Creates a new Query of the given type.
type | the query type. |
virtual ork::Query::~Query | ( | ) | [virtual] |
Deletes this query.
bool ork::Query::available | ( | ) |
Returns true if the result of this query is available.
void ork::Query::begin | ( | ) |
Starts this query.
void ork::Query::end | ( | ) |
Ends this query.
GLuint ork::Query::getId | ( | ) |
Returns the id of this query.
GLuint64 ork::Query::getResult | ( | ) |
Returns the result of this query.
This may block the caller until the result is available.
QueryType ork::Query::getType | ( | ) |
Returns the type of this query.