Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
GPUMarker Class Reference

Inserted a marker on the current render or upload command buffer. These markers are visible in profling and debugging tools such as Renderdoc, as are object debug labels. More...

#include <GPUTypes.hpp>

Public Types

enum class  Type : uint { SCOPE , INSERT }
 
enum class  Target : uint { RENDER , UPLOAD }
 

Public Member Functions

 GPUMarker (const std::string &label, const glm::vec4 &color, Type type=GPUMarker::Type::SCOPE, Target target=GPUMarker::Target::RENDER)
 
 GPUMarker (const std::string &label, Type type=GPUMarker::Type::SCOPE, Target target=GPUMarker::Target::RENDER)
 
 ~GPUMarker ()
 Destructor.
 

Private Member Functions

void createMarker (const std::string &label, const glm::vec4 &color)
 

Private Attributes

Type _type = GPUMarker::Type::SCOPE
 The type of marker.
 
Target _target = GPUMarker::Target::RENDER
 The target command buffer.
 

Detailed Description

Inserted a marker on the current render or upload command buffer. These markers are visible in profling and debugging tools such as Renderdoc, as are object debug labels.

Member Enumeration Documentation

◆ Target

enum class GPUMarker::Target : uint
strong

Target command buffer of marker

Enumerator
RENDER 

The marker will be inserted in the render command buffer.

UPLOAD 

The marker will be inserted in the upload command buffer.

◆ Type

enum class GPUMarker::Type : uint
strong

Lifetime duration of marker

Enumerator
SCOPE 

The marker will aggregate everything recorded in the command buffer during the marker lifetime.

INSERT 

The marker will be inserted at the current point.

Constructor & Destructor Documentation

◆ GPUMarker() [1/2]

GPUMarker::GPUMarker ( const std::string &  label,
const glm::vec4 &  color,
GPUMarker::Type  type = GPUMarker::Type::SCOPE,
GPUMarker::Target  target = GPUMarker::Target::RENDER 
)

Constructor

Parameters
labelthe label to display
colorthe color to use for the marker (in Renderdoc for instance)
typethe lifetime duration of the marker
targetthe target command buffer

◆ GPUMarker() [2/2]

GPUMarker::GPUMarker ( const std::string &  label,
Type  type = GPUMarker::Type::SCOPE,
Target  target = GPUMarker::Target::RENDER 
)

Constructor

Parameters
labelthe label to display
typethe lifetime duration of the marker
targetthe target command buffer

Member Function Documentation

◆ createMarker()

void GPUMarker::createMarker ( const std::string &  label,
const glm::vec4 &  color 
)
private

Insert the marker in the proper command buffer

Parameters
labelthe marker label
colorthe marker color

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