public

Inheritance Graph

graph BT
	QueryObject
	OcclusionQuery --> QueryObject
	StatisticsQuery --> QueryObject
	click QueryObject "classRendering_1_1QueryObject"
	click OcclusionQuery "classRendering_1_1OcclusionQuery"
	click StatisticsQuery "classRendering_1_1StatisticsQuery"

Description

Wrapper class for OpenGL queries.

See also: OcclusionQuery.h

Author: Benjamin Eikel, Claudius Jähn

Date: 2013-03-21

Public Functions

   
   
  QueryObject(uint32_t _queryType)
Standard constructor.
   
  QueryObject(const QueryObject & other)
   
  QueryObject( QueryObject && other)
   
  ~QueryObject()
Destructor frees the query identifier.
   
QueryObject & operator=(const QueryObject & void)
   
QueryObject & operator=( QueryObject && other)
   
bool isResultAvailable() const
   
uint32_t getResult() const
   
uint64_t getResult64() const
   
void begin() const
Start the query.* end() *has to be called after the rendering was done.
   
void end() const
Stop the query.
   
void queryCounter() const
Record the GL time; only used with GL_TIMESTAMP.
   
bool isValid() const
   
uint32_t _getQueryType() const
Returns the GL constant of the query’s type.

Documentation

function
Rendering::QueryObject::QueryObject

public inline explicit
     
     
QueryObject( uint32_t _queryType )

Standard constructor.

Defined in Rendering/QueryObject.h:28


function
Rendering::QueryObject::QueryObject

public
     
     
QueryObject( const QueryObject & other )

Defined in Rendering/QueryObject.h:30


function
Rendering::QueryObject::QueryObject

public inline
     
     
QueryObject( QueryObject && other )

Defined in Rendering/QueryObject.h:32


function
Rendering::QueryObject::~QueryObject

public inline
   
   
~QueryObject( )

Destructor frees the query identifier.

Defined in Rendering/QueryObject.h:35


function
Rendering::QueryObject::operator=

public
     
     
QueryObject & operator=( const QueryObject & void )

Defined in Rendering/QueryObject.h:37


function
Rendering::QueryObject::operator=

public
     
     
QueryObject & operator=( QueryObject && other )

Defined in Rendering/QueryObject.h:38


function
Rendering::QueryObject::isResultAvailable

public const
   
   
bool isResultAvailable( ) const

Check if the result of the last query is already available.

Returns

trueif the test is finished, false otherwise.

Defined in Rendering/QueryObject.h:43


function
Rendering::QueryObject::getResult

public const
   
   
uint32_t getResult( ) const

Return the result of the query.

Returns

result value (e.g. sample count )

Defined in Rendering/QueryObject.h:48


function
Rendering::QueryObject::getResult64

public const
   
   
uint64_t getResult64( ) const

Returns the result as 64bit value. If the used open gl driver does not support ‘GL_ARB_timer_query’, a warning is shown once and getResult() is returned instead.

Defined in Rendering/QueryObject.h:53


function
Rendering::QueryObject::begin

public const
   
   
void begin( ) const

Start the query.* end() *has to be called after the rendering was done.

Defined in Rendering/QueryObject.h:56


function
Rendering::QueryObject::end

public const
   
   
void end( ) const

Stop the query.

Defined in Rendering/QueryObject.h:59


function
Rendering::QueryObject::queryCounter

public const
   
   
void queryCounter( ) const

Record the GL time; only used with GL_TIMESTAMP.

Defined in Rendering/QueryObject.h:62


function
Rendering::QueryObject::isValid

public const inline
   
   
bool isValid( ) const

Defined in Rendering/QueryObject.h:64


function
Rendering::QueryObject::_getQueryType

public const inline
   
   
uint32_t _getQueryType( ) const

Returns the GL constant of the query’s type.

Note: Don’t rely on GL constants from outside of Rendering .

Defined in Rendering/QueryObject.h:67