Castor3D  ..
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Castor3D::GpuQuery Class Referenceabstract

GPU query implementation. More...

+ Inheritance diagram for Castor3D::GpuQuery:
+ Collaboration diagram for Castor3D::GpuQuery:

Public Member Functions

C3D_API GpuQuery (RenderSystem &p_renderSystem, eQUERY_TYPE p_query)
 Constructor. More...
 
virtual C3D_API ~GpuQuery ()
 Destructor. More...
 
C3D_API bool Create ()
 Creates the query on GPU. More...
 
C3D_API void Destroy ()
 Destroys the query on GPU. More...
 
C3D_API bool Begin ()
 Begins the query. More...
 
C3D_API void End ()
 Ends the query. More...
 
template<typename T >
bool GetInfos (eQUERY_INFO p_infos, T &p_param) const
 Retrieves query information. More...
 

Protected Member Functions

virtual C3D_API bool DoCreate ()=0
 Creates the query on GPU. More...
 
virtual C3D_API void DoDestroy ()=0
 Destroys the query on GPU. More...
 
virtual C3D_API bool DoBegin () const =0
 Begins the query. More...
 
virtual C3D_API void DoEnd () const =0
 Ends the query. More...
 
virtual C3D_API bool DoGetInfos (eQUERY_INFO p_infos, int32_t &p_param) const =0
 Retrieves query information. More...
 
virtual C3D_API bool DoGetInfos (eQUERY_INFO p_infos, uint32_t &p_param) const =0
 Retrieves query information. More...
 
virtual C3D_API bool DoGetInfos (eQUERY_INFO p_infos, int64_t &p_param) const =0
 Retrieves query information. More...
 
virtual C3D_API bool DoGetInfos (eQUERY_INFO p_infos, uint64_t &p_param) const =0
 Retrieves query information. More...
 

Protected Attributes

bool m_active { false }
 Tells if the query is active. More...
 
eQUERY_TYPE m_type
 The query type. More...
 

Detailed Description

GPU query implementation.

Author
Sylvain DOREMUS
Date
16/03/2016
Version
0.8.0

Constructor & Destructor Documentation

◆ GpuQuery()

C3D_API Castor3D::GpuQuery::GpuQuery ( RenderSystem p_renderSystem,
eQUERY_TYPE  p_query 
)

Constructor.

Parameters
[in]p_renderSystemThe RenderSystem.
[in]p_queryThe query type.

◆ ~GpuQuery()

virtual C3D_API Castor3D::GpuQuery::~GpuQuery ( )
virtual

Destructor.

Member Function Documentation

◆ Begin()

C3D_API bool Castor3D::GpuQuery::Begin ( )

Begins the query.

Returns
true if everything is OK.

◆ Create()

C3D_API bool Castor3D::GpuQuery::Create ( )

Creates the query on GPU.

Returns
true if everything is OK.

◆ Destroy()

C3D_API void Castor3D::GpuQuery::Destroy ( )

Destroys the query on GPU.

◆ DoBegin()

virtual C3D_API bool Castor3D::GpuQuery::DoBegin ( ) const
protectedpure virtual

Begins the query.

Returns
true if everything is OK.

◆ DoCreate()

virtual C3D_API bool Castor3D::GpuQuery::DoCreate ( )
protectedpure virtual

Creates the query on GPU.

Returns
true if everything is OK.

◆ DoDestroy()

virtual C3D_API void Castor3D::GpuQuery::DoDestroy ( )
protectedpure virtual

Destroys the query on GPU.

◆ DoEnd()

virtual C3D_API void Castor3D::GpuQuery::DoEnd ( ) const
protectedpure virtual

Ends the query.

◆ DoGetInfos() [1/4]

virtual C3D_API bool Castor3D::GpuQuery::DoGetInfos ( eQUERY_INFO  p_infos,
int32_t &  p_param 
) const
protectedpure virtual

Retrieves query information.

Parameters
[in]p_infosThe information to retrieve.
[out]p_paramReceives the result.
Returns
true if the information was retrieved.

Referenced by GetInfos().

+ Here is the caller graph for this function:

◆ DoGetInfos() [2/4]

virtual C3D_API bool Castor3D::GpuQuery::DoGetInfos ( eQUERY_INFO  p_infos,
uint32_t &  p_param 
) const
protectedpure virtual

Retrieves query information.

Parameters
[in]p_infosThe information to retrieve.
[out]p_paramReceives the result.
Returns
true if the information was retrieved.

◆ DoGetInfos() [3/4]

virtual C3D_API bool Castor3D::GpuQuery::DoGetInfos ( eQUERY_INFO  p_infos,
int64_t &  p_param 
) const
protectedpure virtual

Retrieves query information.

Parameters
[in]p_infosThe information to retrieve.
[out]p_paramReceives the result.
Returns
true if the information was retrieved.

◆ DoGetInfos() [4/4]

virtual C3D_API bool Castor3D::GpuQuery::DoGetInfos ( eQUERY_INFO  p_infos,
uint64_t &  p_param 
) const
protectedpure virtual

Retrieves query information.

Parameters
[in]p_infosThe information to retrieve.
[out]p_paramReceives the result.
Returns
true if the information was retrieved.

◆ End()

C3D_API void Castor3D::GpuQuery::End ( )

Ends the query.

◆ GetInfos()

template<typename T >
bool Castor3D::GpuQuery::GetInfos ( eQUERY_INFO  p_infos,
T &  p_param 
) const
inline

Retrieves query information.

Parameters
[in]p_infosThe information to retrieve.
[out]p_paramReceives the result.
Returns
true if the information was retrieved.

References DoGetInfos().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_active

bool Castor3D::GpuQuery::m_active { false }
protected

Tells if the query is active.

◆ m_type

eQUERY_TYPE Castor3D::GpuQuery::m_type
protected

The query type.


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