clan::OcclusionQuery Class Reference

Graphics occlusion query class. More...

#include <occlusion_query.h>

Public Member Functions

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

Detailed Description

Graphics occlusion query class.

Constructor & Destructor Documentation

◆ OcclusionQuery() [1/2]

clan::OcclusionQuery::OcclusionQuery ( )

Constructs a null instance.

◆ OcclusionQuery() [2/2]

clan::OcclusionQuery::OcclusionQuery ( GraphicContext & context)

Constructs an occlusion query object.

◆ ~OcclusionQuery()

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

Member Function Documentation

◆ begin()

void clan::OcclusionQuery::begin ( )

Start occlusion query.

◆ end()

void clan::OcclusionQuery::end ( )

Finish occlusion query.

◆ get_provider()

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

Get Provider.

Returns
provider

◆ get_result()

int clan::OcclusionQuery::get_result ( )

Returns the result of the occlusion query.

◆ is_null()

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

Returns true if this object is invalid.

◆ is_result_ready()

bool clan::OcclusionQuery::is_result_ready ( )

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

◆ operator bool()

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

◆ throw_if_null()

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: