CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUTimerQuery::Scope Class Reference

A helper class that begins a scoped timer query. More...

#include <CeresEngine/RenderAPI/GPUQuery.hpp>

Public Member Functions

 Scope (GPUCommandBuffer &commandBuffer, GPUTimerQuery &query, const UInt32 timerIndex=0)
 Creates a new scope and calls begin() on the query.
 
 Scope (const GPUCommandBufferPtr &commandBuffer, GPUTimerQuery &query, const UInt32 timerIndex=0)
 Creates a new scope and calls begin() on the query.
 
 Scope (GPUCommandBuffer &commandBuffer, const GPUTimerQueryPtr &query, const UInt32 timerIndex=0)
 
 Scope (const GPUCommandBufferPtr &commandBuffer, const GPUTimerQueryPtr &query, const UInt32 timerIndex=0)
 
 ~Scope () noexcept
 Unbound the pipeline from the command buffer.
 
void reset ()
 Unbound the pipeline from the command buffer.
 

Private Attributes

GPUCommandBuffermCommandBuffer = nullptr
 The command buffer to which commands are being recorded on.
 
GPUTimerQuerymQuery = nullptr
 The timer query to be bound within the scope.
 
UInt32 mTimerIndex = 0
 The index of the timer to be started.
 

Detailed Description

A helper class that begins a scoped timer query.

Constructor & Destructor Documentation

◆ Scope() [1/4]

CeresEngine::GPUTimerQuery::Scope::Scope ( GPUCommandBuffer commandBuffer,
GPUTimerQuery query,
const UInt32  timerIndex = 0 
)
inlineexplicit

Creates a new scope and calls begin() on the query.

Parameters
commandBufferThe command buffer to bind the pipeline to.
queryThe query to be bound.
timerIndexThe index of the timer query to be started.

◆ Scope() [2/4]

CeresEngine::GPUTimerQuery::Scope::Scope ( const GPUCommandBufferPtr commandBuffer,
GPUTimerQuery query,
const UInt32  timerIndex = 0 
)
inlineexplicit

Creates a new scope and calls begin() on the query.

Parameters
commandBufferThe command buffer to bind the pipeline to.
queryThe query to be bound.
timerIndexThe index of the timer query to be started.

◆ Scope() [3/4]

CeresEngine::GPUTimerQuery::Scope::Scope ( GPUCommandBuffer commandBuffer,
const GPUTimerQueryPtr query,
const UInt32  timerIndex = 0 
)
inlineexplicit

◆ Scope() [4/4]

CeresEngine::GPUTimerQuery::Scope::Scope ( const GPUCommandBufferPtr commandBuffer,
const GPUTimerQueryPtr query,
const UInt32  timerIndex = 0 
)
inlineexplicit

◆ ~Scope()

CeresEngine::GPUTimerQuery::Scope::~Scope ( )
inlinenoexcept

Unbound the pipeline from the command buffer.

Member Function Documentation

◆ reset()

void CeresEngine::GPUTimerQuery::Scope::reset ( )
inline

Unbound the pipeline from the command buffer.

Member Data Documentation

◆ mCommandBuffer

GPUCommandBuffer* CeresEngine::GPUTimerQuery::Scope::mCommandBuffer = nullptr
private

The command buffer to which commands are being recorded on.

◆ mQuery

GPUTimerQuery* CeresEngine::GPUTimerQuery::Scope::mQuery = nullptr
private

The timer query to be bound within the scope.

◆ mTimerIndex

UInt32 CeresEngine::GPUTimerQuery::Scope::mTimerIndex = 0
private

The index of the timer to be started.


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