2#include "graphics/Program.hpp"
3#include "graphics/GPUTypes.hpp"
51 void pushMarker(
const std::string& category,
const std::string& label,
const glm::vec4& color);
58 void insertMarker(
const std::string& category,
const std::string& label,
const glm::vec4& color);
63 void popMarker(
const std::string& category);
126 static void pushMarkerDefault(
const std::string& category,
const std::string& label,
const glm::vec4& color);
133 static void insertMarkerDefault(
const std::string& category,
const std::string& label,
const glm::vec4& color);
152 glm::vec2
range = glm::vec2(0.0f, 1.0f);
153 glm::bvec4
channels = glm::bvec4(
true,
true,
true,
false);
239 std::unordered_map<std::string, StateInfos>
_states;
240 std::unordered_map<std::string, MarkerCategoryInfos>
_markers;
Provide helper GUI to display the content of textures and mesh infos. This can be useful to validate ...
Definition: DebugViewer.hpp:13
static void trackStateDefault(const std::string &name)
Definition: DebugViewer.cpp:657
void interface()
Definition: DebugViewer.cpp:259
void insertMarker(const std::string &category, const std::string &label, const glm::vec4 &color)
Definition: DebugViewer.cpp:123
void nextFrame()
Definition: DebugViewer.cpp:244
void displayMetrics()
Definition: DebugViewer.cpp:342
void untrack(const Texture *tex)
Definition: DebugViewer.cpp:229
void updateDisplay(const TextureInfos &tex)
Definition: DebugViewer.cpp:605
static void insertMarkerDefault(const std::string &category, const std::string &label, const glm::vec4 &color)
Definition: DebugViewer.cpp:685
Program * _texDisplay
Texture display shader.
Definition: DebugViewer.hpp:242
static void popMarkerDefault(const std::string &category)
Definition: DebugViewer.cpp:692
static void pushMarkerDefault(const std::string &category, const std::string &label, const glm::vec4 &color)
Definition: DebugViewer.cpp:678
static void trackDefault(const Texture *tex)
Definition: DebugViewer.cpp:643
static void untrackDefault(const Texture *tex)
Definition: DebugViewer.cpp:664
void displayState(const std::string &name, StateInfos &infos)
Definition: DebugViewer.cpp:407
std::unordered_map< std::string, MarkerCategoryInfos > _markers
The registered markers.
Definition: DebugViewer.hpp:240
void trackState(const std::string &name)
Definition: DebugViewer.cpp:152
void registerTexture(const std::string &name, const Texture *tex, TextureInfos &infos)
Definition: DebugViewer.cpp:161
void track(const Texture *tex)
Definition: DebugViewer.cpp:27
void displayMesh(MeshInfos &mesh)
Definition: DebugViewer.cpp:517
DebugViewer(const DebugViewer &)=delete
static DebugViewer * _shared
Optional shared debug viewer.
Definition: DebugViewer.hpp:142
void displayMarker(const MarkerInfos &marker)
Definition: DebugViewer.cpp:365
uint64_t _frameCounter
Frame counter.
Definition: DebugViewer.hpp:243
void displayTexture(const std::string &prefix, TextureInfos &tex)
Definition: DebugViewer.cpp:549
std::unordered_map< std::string, StateInfos > _states
GPU states currently tracked.
Definition: DebugViewer.hpp:239
uint _winId
Internal window counter.
Definition: DebugViewer.hpp:247
uint _drawableId
Default drawable name counter.
Definition: DebugViewer.hpp:245
DebugViewer & operator=(DebugViewer &&)=delete
DebugViewer(DebugViewer &&)=delete
static void setDefault(DebugViewer *viewer)
Definition: DebugViewer.cpp:639
void pushMarker(const std::string &category, const std::string &label, const glm::vec4 &color)
Definition: DebugViewer.cpp:102
uint _markerId
Internal marker counter.
Definition: DebugViewer.hpp:248
std::vector< TextureInfos > _textures
The registered textures.
Definition: DebugViewer.hpp:236
uint _textureId
Default texture name counter.
Definition: DebugViewer.hpp:244
DebugViewer & operator=(const DebugViewer &)=delete
std::vector< MeshInfos > _meshes
The registered meshes.
Definition: DebugViewer.hpp:238
std::vector< TextureInfos > _drawables
The registered drawable textures.
Definition: DebugViewer.hpp:237
DebugViewer()
Definition: DebugViewer.cpp:23
void displayMarkers(const std::string &name, MarkerCategoryInfos &category)
Definition: DebugViewer.cpp:382
uint _meshId
Default mesh name counter.
Definition: DebugViewer.hpp:246
void popMarker(const std::string &category)
Definition: DebugViewer.cpp:142
Internal GPU state ; not all API options are exposed, only these that can be toggled in Rendu.
Definition: GPUTypes.hpp:324
Represents a geometric mesh composed of vertices, other attributes and triangles.
Definition: Mesh.hpp:15
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Definition: DebugViewer.hpp:183
int frequency
Sampling frequency.
Definition: DebugViewer.hpp:185
bool record
Should the category be recorded at this frame.
Definition: DebugViewer.hpp:189
uint depth
Current marker hierarchy depth.
Definition: DebugViewer.hpp:187
bool visible
Are the marker details displayed.
Definition: DebugViewer.hpp:188
std::vector< MarkerInfos > markers
Root markers.
Definition: DebugViewer.hpp:184
int offset
Sampling offset.
Definition: DebugViewer.hpp:186
Definition: DebugViewer.hpp:175
std::string name
Marker label.
Definition: DebugViewer.hpp:176
uint index
Marker index in the frame.
Definition: DebugViewer.hpp:178
glm::vec4 color
Marker color.
Definition: DebugViewer.hpp:177
std::vector< MarkerInfos > markers
Child markers.
Definition: DebugViewer.hpp:179
Definition: DebugViewer.hpp:161
const Mesh * mesh
Mesh to track.
Definition: DebugViewer.hpp:162
std::string name
Mesh display name.
Definition: DebugViewer.hpp:163
bool visible
Are the mesh details displayed.
Definition: DebugViewer.hpp:164
Definition: DebugViewer.hpp:168
bool visible
Is the state window visible.
Definition: DebugViewer.hpp:170
GPUState state
GPU state to track.
Definition: DebugViewer.hpp:169
bool populated
Has the state already been queried.
Definition: DebugViewer.hpp:171
Definition: DebugViewer.hpp:147
std::string displayName
Texture name with extra information about the layout,...
Definition: DebugViewer.hpp:151
int mip
Mipmap level to display.
Definition: DebugViewer.hpp:154
std::string name
Texture name.
Definition: DebugViewer.hpp:149
std::unique_ptr< Texture > display
Texture used for visualization.
Definition: DebugViewer.hpp:150
int layer
Layer to display for arrays and 3D textures.
Definition: DebugViewer.hpp:155
bool visible
Is the texture window visible.
Definition: DebugViewer.hpp:157
glm::bvec4 channels
Channels that should be displayed.
Definition: DebugViewer.hpp:153
bool gamma
Should gamma correction be applied.
Definition: DebugViewer.hpp:156
glm::vec2 range
Range of values to display normalized.
Definition: DebugViewer.hpp:152
const Texture * tex
The texture to display.
Definition: DebugViewer.hpp:148