CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::GPUOcclusionQuery Class Referenceabstract

#include <CeresEngine/RenderAPI/GPUQuery.hpp>

Inheritance diagram for CeresEngine::GPUOcclusionQuery:
CeresEngine::GPUQuery CeresEngine::TDeviceObject< GPUOcclusionQueryDescriptor > CeresEngine::GPUDeviceObject CeresEngine::GPUObject

Classes

class  Scope
 A helper class that begins a scoped occlusion query. More...
 

Public Member Functions

 GPUOcclusionQuery (const GPUOcclusionQuery &)=delete
 Deleted copy constructor.
 
GPUOcclusionQueryoperator= (const GPUOcclusionQuery &)=delete
 
 GPUOcclusionQuery (GPUOcclusionQuery &&)=delete
 Deleted move constructor.
 
GPUOcclusionQueryoperator= (GPUOcclusionQuery &&)=delete
 
virtual void begin (GPUCommandBuffer &commandBuffer)=0
 Begins the occlusion query.
 
virtual void end (GPUCommandBuffer &commandBuffer)=0
 Ends the occlusion query.
 
template<typename Func >
decltype(autowith (GPUCommandBuffer &commandBuffer, Func &&func)
 Measures the time the GPU takes to run the commands run in commandBuffer from inside the given func.
 
 TDeviceObject (GPUDevice &device, const Descriptor &descriptor)
 Inherited constructors.
 
 TDeviceObject (const TDeviceObject &)=delete
 Inherited constructors.
 
 TDeviceObject (TDeviceObject &&)=delete
 Inherited constructors.
 
- Public Member Functions inherited from CeresEngine::TDeviceObject< GPUOcclusionQueryDescriptor >
 TDeviceObject (GPUDevice &device, const Descriptor &descriptor)
 Initializes a new RenderAPI device object instance.
 
 TDeviceObject (const TDeviceObject &)=delete
 
 TDeviceObject (TDeviceObject &&)=delete
 
 ~TDeviceObject () override=default
 
TDeviceObjectoperator= (const TDeviceObject &)=delete
 
TDeviceObjectoperator= (TDeviceObject &&)=delete
 
- Public Member Functions inherited from CeresEngine::GPUDeviceObject
 GPUDeviceObject (GPUDevice &device)
 
 ~GPUDeviceObject () override
 
- Public Member Functions inherited from CeresEngine::GPUObject
 GPUObject ()=default
 
virtual ~GPUObject ()=default
 
 GPUObject (const GPUObject &)=delete
 
GPUObjectoperator= (const GPUObject &)=delete
 
 GPUObject (GPUObject &&)=delete
 
GPUObjectoperator= (GPUObject &&)=delete
 
void retain () noexcept
 Retains the object by increment it's reference count by one.
 
bool release () noexcept
 Releases the object by decrementing it's reference count by one.
 

Additional Inherited Members

- Public Types inherited from CeresEngine::TDeviceObject< GPUOcclusionQueryDescriptor >
using Descriptor = GPUOcclusionQueryDescriptor
 An type-alias to the descriptor struct type.
 
- Public Attributes inherited from CeresEngine::TDeviceObject< GPUOcclusionQueryDescriptor >
const Descriptordescriptor
 A structure that describes the object and it's properties.
 
- Public Attributes inherited from CeresEngine::GPUDeviceObject
GPUDevicedevice
 The owning device this object was created from.
 
- Protected Member Functions inherited from CeresEngine::GPUObject
virtual void destroy () noexcept
 A internal method called by the system when the object reference count reaches zero.
 

Constructor & Destructor Documentation

◆ GPUOcclusionQuery() [1/2]

CeresEngine::GPUOcclusionQuery::GPUOcclusionQuery ( const GPUOcclusionQuery )
delete

Deleted copy constructor.

◆ GPUOcclusionQuery() [2/2]

CeresEngine::GPUOcclusionQuery::GPUOcclusionQuery ( GPUOcclusionQuery &&  )
delete

Deleted move constructor.

Member Function Documentation

◆ begin()

virtual void CeresEngine::GPUOcclusionQuery::begin ( GPUCommandBuffer commandBuffer)
pure virtual

Begins the occlusion query.

This will insert a command to write the number of samples that have passed between the call to begin() and end().

Note
You must manually call end() to ensure that the measurement is ended. You can alternatively use with() which will measure all GPU commands triggered inside it.
Parameters
commandBufferThe command buffer to start the query at.

◆ end()

virtual void CeresEngine::GPUOcclusionQuery::end ( GPUCommandBuffer commandBuffer)
pure virtual

Ends the occlusion query.

This will insert a command to write the number of samples that have passed between the call to begin() and end().

Parameters
commandBufferThe command buffer to end the query at.

◆ operator=() [1/2]

GPUOcclusionQuery & CeresEngine::GPUOcclusionQuery::operator= ( const GPUOcclusionQuery )
delete

◆ operator=() [2/2]

GPUOcclusionQuery & CeresEngine::GPUOcclusionQuery::operator= ( GPUOcclusionQuery &&  )
delete

◆ TDeviceObject() [1/3]

Inherited constructors.

◆ TDeviceObject() [2/3]

CeresEngine::TDeviceObject< TDescriptor, TParent >::TDeviceObject ( GPUDevice device,
const Descriptor descriptor 
)
inlineexplicit

Inherited constructors.

◆ TDeviceObject() [3/3]

CeresEngine::TDeviceObject< TDescriptor, TParent >::TDeviceObject ( TDeviceObject &&  )
delete

Inherited constructors.

◆ with()

template<typename Func >
decltype(auto) CeresEngine::GPUOcclusionQuery::with ( GPUCommandBuffer commandBuffer,
Func &&  func 
)
inline

Measures the time the GPU takes to run the commands run in commandBuffer from inside the given func.

Template Parameters
FuncA callable object that adds commands to the command buffer.
Parameters
commandBufferThe command buffer to start the query on.
funcA callable object that adds commands to the command buffer.

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