Query interface. More...
#include <Query.h>
Public Member Functions | |
virtual const QueryDesc &DILIGENT_CALL_TYPE | GetDesc () const override=0 |
Returns the Query description used to create the object. | |
virtual Bool DILIGENT_CALL_TYPE | GetData (void *pData, Uint32 DataSize, Bool AutoInvalidate=true)=0 |
Gets the query data. | |
virtual void DILIGENT_CALL_TYPE | Invalidate ()=0 |
Invalidates the query and releases associated resources. | |
![]() | |
virtual Int32 DILIGENT_CALL_TYPE | GetUniqueID () const =0 |
Returns unique identifier assigned to an object. | |
virtual void DILIGENT_CALL_TYPE | SetUserData (IObject *pUserData)=0 |
Stores a pointer to the user-provided data object. | |
virtual IObject *DILIGENT_CALL_TYPE | GetUserData () const =0 |
Returns a pointer to the user data object previously set with SetUserData() method. | |
![]() | |
virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Query interface.
Defines the methods to manipulate a Query object
|
pure virtual |
Gets the query data.
[in] | pData | - Pointer to the query data structure. Depending on the type of the query, this must be the pointer to Diligent::QueryDataOcclusion, Diligent::QueryDataBinaryOcclusion, Diligent::QueryDataTimestamp, or Diligent::QueryDataPipelineStatistics structure. An application may provide nullptr to only check the query status. |
[in] | DataSize | - Size of the data structure. |
[in] | AutoInvalidate | - Whether to invalidate the query if the results are available and release associated resources. An application should typically always invalidate completed queries unless it needs to retrieve the same data through GetData() multiple times. A query will not be invalidated if pData is nullptr . |
true
if the query data is available and false
otherwise.In Direct3D11 backend timestamp queries will only be available after FinishFrame is called for the frame in which they were collected.
If AutoInvalidate
is set to true, and the data have been retrieved, an application must not call GetData() until it begins and ends the query again.