Provide helper GUI to display the content of textures and mesh infos. This can be useful to validate the content rendered to a specific texture when debugging.
More...
#include <DebugViewer.hpp>
|
|
std::vector< TextureInfos > | _textures |
| | The registered textures.
|
| |
|
std::vector< TextureInfos > | _drawables |
| | The registered drawable textures.
|
| |
|
std::vector< MeshInfos > | _meshes |
| | The registered meshes.
|
| |
|
std::unordered_map< std::string, StateInfos > | _states |
| | GPU states currently tracked.
|
| |
|
std::unordered_map< std::string, MarkerCategoryInfos > | _markers |
| | The registered markers.
|
| |
|
Program * | _texDisplay |
| | Texture display shader.
|
| |
|
uint64_t | _frameCounter = 0 |
| | Frame counter.
|
| |
|
uint | _textureId = 0 |
| | Default texture name counter.
|
| |
|
uint | _drawableId = 0 |
| | Default drawable name counter.
|
| |
|
uint | _meshId = 0 |
| | Default mesh name counter.
|
| |
|
uint | _winId = 0 |
| | Internal window counter.
|
| |
|
uint | _markerId = 0 |
| | Internal marker counter.
|
| |
|
|
static DebugViewer * | _shared = nullptr |
| | Optional shared debug viewer.
|
| |
Provide helper GUI to display the content of textures and mesh infos. This can be useful to validate the content rendered to a specific texture when debugging.
◆ DebugViewer() [1/3]
| DebugViewer::DebugViewer |
( |
| ) |
|
|
explicit |
◆ ~DebugViewer()
| DebugViewer::~DebugViewer |
( |
| ) |
|
|
default |
◆ DebugViewer() [2/3]
◆ DebugViewer() [3/3]
◆ displayMarker()
| void DebugViewer::displayMarker |
( |
const MarkerInfos & |
marker | ) |
|
|
private |
Display GPU marker and its children
- Parameters
-
| marker | the marker to display |
◆ displayMarkers()
Display a hierarchy of GPU markers
- Parameters
-
| name | the name of the category |
| category | the category of markers to display |
◆ displayMesh()
| void DebugViewer::displayMesh |
( |
MeshInfos & |
mesh | ) |
|
|
private |
Display a mesh information in a panel.
- Parameters
-
◆ displayMetrics()
| void DebugViewer::displayMetrics |
( |
| ) |
|
|
private |
Display GPU metrics for the last completed frame in a panel.
◆ displayState()
| void DebugViewer::displayState |
( |
const std::string & |
name, |
|
|
StateInfos & |
infos |
|
) |
| |
|
private |
Display GPU state in a panel.
- Parameters
-
| name | name of the state |
| infos | the state to display |
◆ displayTexture()
| void DebugViewer::displayTexture |
( |
const std::string & |
prefix, |
|
|
TextureInfos & |
tex |
|
) |
| |
|
private |
Display a texture with some helper GUI.
- Parameters
-
| prefix | the display name of the texture |
| tex | the texture information to display |
◆ insertMarker()
| void DebugViewer::insertMarker |
( |
const std::string & |
category, |
|
|
const std::string & |
label, |
|
|
const glm::vec4 & |
color |
|
) |
| |
Register a punctual marker
- Parameters
-
| category | the marker category |
| label | the marker name |
| color | the marker color |
◆ insertMarkerDefault()
| void DebugViewer::insertMarkerDefault |
( |
const std::string & |
category, |
|
|
const std::string & |
label, |
|
|
const glm::vec4 & |
color |
|
) |
| |
|
static |
Register a punctual marker
- Parameters
-
| category | the marker category |
| label | the marker name |
| color | the marker color |
◆ interface()
| void DebugViewer::interface |
( |
| ) |
|
Display interface and monitored data.
◆ nextFrame()
| void DebugViewer::nextFrame |
( |
| ) |
|
◆ operator=() [1/2]
Copy assignment.
- Returns
- a reference to the object assigned to
◆ operator=() [2/2]
Move assignment.
- Returns
- a reference to the object assigned to
◆ popMarker()
| void DebugViewer::popMarker |
( |
const std::string & |
category | ) |
|
Notify of the end of a scoped marker
- Parameters
-
| category | the category to which the marker belonged |
◆ popMarkerDefault()
| void DebugViewer::popMarkerDefault |
( |
const std::string & |
category | ) |
|
|
static |
Notify of the end of a scoped marker
- Parameters
-
| category | the category to which the marker belonged |
◆ pushMarker()
| void DebugViewer::pushMarker |
( |
const std::string & |
category, |
|
|
const std::string & |
label, |
|
|
const glm::vec4 & |
color |
|
) |
| |
Register a scoped marker
- Parameters
-
| category | the marker category |
| label | the marker name |
| color | the marker color |
◆ pushMarkerDefault()
| void DebugViewer::pushMarkerDefault |
( |
const std::string & |
category, |
|
|
const std::string & |
label, |
|
|
const glm::vec4 & |
color |
|
) |
| |
|
static |
Register a scoped marker
- Parameters
-
| category | the marker category |
| label | the marker name |
| color | the marker color |
◆ registerTexture()
| void DebugViewer::registerTexture |
( |
const std::string & |
name, |
|
|
const Texture * |
tex, |
|
|
TextureInfos & |
infos |
|
) |
| |
|
private |
Populate texture information based on an input texture.
- Parameters
-
| name | the name of the texture |
| tex | the texture to monitor |
| infos | the information that should be populated |
◆ setDefault()
Register a default debug viewer.
- Parameters
-
| viewer | the viewer to use as default |
◆ track() [1/2]
| void DebugViewer::track |
( |
const Mesh * |
mesh | ) |
|
Register a mesh for debug.
- Parameters
-
◆ track() [2/2]
| void DebugViewer::track |
( |
const Texture * |
tex | ) |
|
Register a texture for debug.
- Parameters
-
| tex | the texture to monitor |
◆ trackDefault() [1/2]
| void DebugViewer::trackDefault |
( |
const Mesh * |
mesh | ) |
|
|
static |
Register a mesh for debug.
- Parameters
-
◆ trackDefault() [2/2]
| void DebugViewer::trackDefault |
( |
const Texture * |
tex | ) |
|
|
static |
Register a texture for debug.
- Parameters
-
| tex | the texture to monitor |
◆ trackState()
| void DebugViewer::trackState |
( |
const std::string & |
name | ) |
|
Track the GPU state at the moment of the call. Can be called at each frame to track varying state.
- Parameters
-
| name | the display name of the state |
◆ trackStateDefault()
| void DebugViewer::trackStateDefault |
( |
const std::string & |
name | ) |
|
|
static |
Register current GPU state for debug;
- Parameters
-
| name | how to name the state in the list |
◆ untrack() [1/2]
| void DebugViewer::untrack |
( |
const Mesh * |
mesh | ) |
|
Stop monitoring a mesh.
- Parameters
-
| mesh | the mesh to stop tracking |
◆ untrack() [2/2]
| void DebugViewer::untrack |
( |
const Texture * |
tex | ) |
|
Stop monitoring a texture.
- Parameters
-
| tex | the texture to stop tracking |
◆ untrackDefault() [1/2]
| void DebugViewer::untrackDefault |
( |
const Mesh * |
mesh | ) |
|
|
static |
Stop monitoring a mesh.
- Parameters
-
| mesh | the mesh to stop tracking |
◆ untrackDefault() [2/2]
| void DebugViewer::untrackDefault |
( |
const Texture * |
tex | ) |
|
|
static |
Stop monitoring a texture.
- Parameters
-
| tex | the texture to stop tracking |
◆ updateDisplay()
Update the visualization associated to a texture/
- Parameters
-
| tex | the texture to update the display of |
The documentation for this class was generated from the following files: