Diligent::ScopedQueryHelper class

Helper class to manage scoped queries. One scoped query instance must be used once per frame.

Contents

Public functions

void Begin(IDeviceContext* pCtx)
Begins a query.
auto End(IDeviceContext* pCtx, void* pData, Uint32 DataSize) -> bool
Ends a query and returns the query data, if it is available.

Function documentation

void Diligent::ScopedQueryHelper::Begin(IDeviceContext* pCtx)

Begins a query.

Parameters
pCtx in - Context to record begin query command

bool Diligent::ScopedQueryHelper::End(IDeviceContext* pCtx, void* pData, Uint32 DataSize)

Ends a query and returns the query data, if it is available.

Parameters
pCtx in - Context to record end query command.
pData out - Pointer to the buffer that will receive query data.
DataSize in - Buffer data size.
Returns true if the data from the oldest query is available, and false otherwise.