9#include "renderdoc_app.h"
10#include "../utility/utility.hpp"
11#include "../char_maps/char_maps.hpp"
12#include "../telemetry/telemetry.hpp"
13#include "../macros.hpp"
17hi_export_module(hikogui.GFX.render_doc);
19hi_export
namespace hi {
inline namespace v1 {
21hi_inline
void *render_doc_api =
nullptr;
25 if (
not render_doc_api) {
29 uint32_t
or_mask = eRENDERDOC_Overlay_None;
30 uint32_t
and_mask = eRENDERDOC_Overlay_None;
33 or_mask |= eRENDERDOC_Overlay_Enabled;
35 and_mask |= eRENDERDOC_Overlay_Enabled;
39 or_mask |= eRENDERDOC_Overlay_FrameRate;
41 and_mask |= eRENDERDOC_Overlay_FrameRate;
45 or_mask |= eRENDERDOC_Overlay_FrameNumber;
47 and_mask |= eRENDERDOC_Overlay_FrameNumber;
51 or_mask |= eRENDERDOC_Overlay_CaptureList;
53 and_mask |= eRENDERDOC_Overlay_CaptureList;
62hi_inline
void start_render_doc()
noexcept
65#if HI_OPERATING_SYSTEM == HI_OS_WINDOWS
67 std::filesystem::path{
"renderdoc.dll"},
68 std::filesystem::path{
"C:/Program Files/RenderDoc/renderdoc.dll"},
69 std::filesystem::path{
"C:/Program Files (x86)/RenderDoc/renderdoc.dll"}};
73 hi_log_debug(
"Trying to load: {}",
dll_url.string());
83 hi_log_warning(
"Could not load renderdoc.dll");
89 hi_log_error(
"Could not find RENDERDOC_GetAPI in renderdoc.dll");
95 hi_log_error(
"RENDERDOC_GetAPI returns invalid value {}",
ret);
96 render_doc_api =
nullptr;
108 render_doc_set_overlay(
false,
false,
false);
Rules for working with win32 headers.
DOXYGEN BUG.
Definition algorithm_misc.hpp:20
The HikoGUI namespace.
Definition recursive_iterator.hpp:15
constexpr Out narrow_cast(In const &rhs) noexcept
Cast numeric values without loss of precision.
Definition cast.hpp:378
Definition renderdoc_app.h:579