OGLplus (0.45.0) a C++ wrapper for OpenGL

oglplus::QueryOps Class Reference

Wrapper for asynchronous query functions. More...

#include </home/chochlik/devel/oglplus/include/oglplus/query.hpp>

Inheritance diagram for oglplus::QueryOps:

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...
 

Detailed Description

Wrapper for asynchronous query functions.

Note
Do not use this class directly, use Query instead.
Related OpenGL symbols:
glGenQueries glDeleteQueries glIsQuery

Member Function Documentation

void oglplus::QueryOps::Begin ( Target  target) const

Begin the query on the specified target.

Related OpenGL symbols:
glBeginQuery

References oglplus::EnumValueName(), and OGLPLUS_VERIFY.

void oglplus::QueryOps::Counter ( Target  target) const

Do a counter query on the specified target.

Related OpenGL symbols:
glQueryCounter

References oglplus::EnumValueName(), and OGLPLUS_VERIFY.

Referenced by Timestamp().

void oglplus::QueryOps::End ( Target  target) const

End the query on the specified target.

Related OpenGL symbols:
glEndQuery

References oglplus::EnumValueName(), and OGLPLUS_VERIFY.

template<typename ResultType >
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.

Related OpenGL symbols:
glGetQueryObject GL_QUERY_RESULT

References OGLPLUS_VERIFY.

Referenced by WaitForResult().

void oglplus::QueryOps::Result ( GLuint &  result) const

Get the query result.

Related OpenGL symbols:
glGetQueryObject 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.

Related OpenGL symbols:
glGetQueryObject 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.

Related OpenGL symbols:
glGetQueryObject GL_QUERY_RESULT

References OGLPLUS_VERIFY.

bool oglplus::QueryOps::ResultAvailable ( void  ) const

Returns true if the query result is available.

Related OpenGL symbols:
glGetQueryObject GL_QUERY_RESULT_AVAILABLE

References OGLPLUS_VERIFY.

Referenced by WaitForResult().

void oglplus::QueryOps::Timestamp ( void  ) const

Do a timestamp query.

Related OpenGL symbols:
glQueryCounter GL_TIMESTAMP

References Counter(), and oglplus::Timestamp.


The documentation for this class was generated from the following file:
  • /home/chochlik/devel/oglplus/include/oglplus/query.hpp

Copyright © 2010-2014 Matúš Chochlík, University of Žilina, Žilina, Slovakia.
<matus.chochlik -at- fri.uniza.sk>
<chochlik -at -gmail.com>
Documentation generated on Wed Apr 30 2014 by Doxygen (version 1.8.4).