clan::OcclusionQuery Class Reference

Graphics occlusion query class. More...

#include <occlusion_query.h>

Public Member Functions

 OcclusionQuery ()
 Constructs a null instance. More...
 
 OcclusionQuery (GraphicContext &context)
 Constructs an occlusion query object. More...
 
virtual ~OcclusionQuery ()
 
void begin ()
 Start occlusion query. More...
 
void end ()
 Finish occlusion query. More...
 
OcclusionQueryProviderget_provider () const
 Get Provider. More...
 
int get_result ()
 Returns the result of the occlusion query. More...
 
bool is_null () const
 Returns true if this object is invalid. More...
 
bool is_result_ready ()
 Returns true if the GPU is ready to return the result. More...
 
 operator bool () const
 
void throw_if_null () const
 Throw an exception if this object is invalid. More...
 

Detailed Description

Graphics occlusion query class.

Constructor & Destructor Documentation

clan::OcclusionQuery::OcclusionQuery ( )

Constructs a null instance.

clan::OcclusionQuery::OcclusionQuery ( GraphicContext context)

Constructs an occlusion query object.

virtual clan::OcclusionQuery::~OcclusionQuery ( )
virtual

Member Function Documentation

void clan::OcclusionQuery::begin ( )

Start occlusion query.

void clan::OcclusionQuery::end ( )

Finish occlusion query.

OcclusionQueryProvider* clan::OcclusionQuery::get_provider ( ) const

Get Provider.

Returns
provider
int clan::OcclusionQuery::get_result ( )

Returns the result of the occlusion query.

bool clan::OcclusionQuery::is_null ( ) const
inline

Returns true if this object is invalid.

bool clan::OcclusionQuery::is_result_ready ( )

Returns true if the GPU is ready to return the result.

clan::OcclusionQuery::operator bool ( ) const
inlineexplicit
void clan::OcclusionQuery::throw_if_null ( ) const

Throw an exception if this object is invalid.


The documentation for this class was generated from the following file: