Wrapper for asynchronous query functions. More...
#include </home/chochlik/devel/oglplus/include/oglplus/query.hpp>
Classes | |
class | Execution |
A helper class automatically executing a query. More... | |
Public Types | |
typedef QueryTarget | Target |
Query bind target. | |
Public Member Functions | |
void | Begin (Target target) const |
Begin the query on the specified target . More... | |
void | End (Target target) const |
End the query on the specified target . More... | |
void | Counter (Target target) const |
Do a counter query on the specified target . More... | |
void | Timestamp (void) const |
Do a timestamp query. More... | |
bool | ResultAvailable (void) const |
Returns true if the query result is available. More... | |
void | Result (GLint &result) const |
Get the query result. More... | |
void | Result (GLuint &result) const |
Get the query result. More... | |
void | Result (GLint64 &result) const |
Get the query result. More... | |
void | Result (GLuint64 &result) const |
Get the query result. More... | |
template<typename ResultType > | |
void | WaitForResult (ResultType &result) const |
Waits for and queries the result. | |
template<typename ResultType > | |
Execution< ResultType > | Execute (Target target, ResultType &result) const |
Executes the query on the specified target and gets the result . More... | |
Wrapper for asynchronous query functions.
void oglplus::QueryOps::Begin | ( | Target | target) | const |
Begin the query on the specified target
.
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
void oglplus::QueryOps::Counter | ( | Target | target) | const |
Do a counter query on the specified target
.
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
Referenced by Timestamp().
void oglplus::QueryOps::End | ( | Target | target) | const |
End the query on the specified target
.
References oglplus::EnumValueName(), and OGLPLUS_VERIFY.
Execution<ResultType> oglplus::QueryOps::Execute | ( | Target | target, |
ResultType & | result | ||
) | const |
Executes the query on the specified target
and gets the result
.
This function creates an instance of the Execution class which begins a query on the specified target
when it is constructed and ends this query and gets its result
when it is destroyed.
void oglplus::QueryOps::Result | ( | GLint & | result) | const |
Get the query result.
GL_QUERY_RESULT
References OGLPLUS_VERIFY.
Referenced by WaitForResult().
void oglplus::QueryOps::Result | ( | GLuint & | result) | const |
Get the query result.
GL_QUERY_RESULT
References OGLPLUS_VERIFY.
void oglplus::QueryOps::Result | ( | GLint64 & | result) | const |
Get the query result.
Requires OpenGL 3.3 or the GL_ARB_timer_query extension.
GL_QUERY_RESULT
References OGLPLUS_VERIFY.
void oglplus::QueryOps::Result | ( | GLuint64 & | result) | const |
Get the query result.
Requires OpenGL 3.3 or the GL_ARB_timer_query extension.
GL_QUERY_RESULT
References OGLPLUS_VERIFY.
bool oglplus::QueryOps::ResultAvailable | ( | void | ) | const |
Returns true if the query result is available.
GL_QUERY_RESULT_AVAILABLE
References OGLPLUS_VERIFY.
Referenced by WaitForResult().
void oglplus::QueryOps::Timestamp | ( | void | ) | const |
Do a timestamp query.
GL_TIMESTAMP
References Counter(), and oglplus::Timestamp.