VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGlDebugGroup.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2020 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 #pragma once
6 
10 
12 #include <vrvUtil/DtProfiler.h>
13 
14 #include <string>
15 
16 namespace makVrv
17 {
18  class DtGlScopedDebugGroup_;
19 }
20 
21 #ifdef TRACY_ENABLE
22 #define TRACY_ON_DEMAND
23 #include <tracy/TracyOpenGL.hpp>
24 
25 #define DtGlScopedDebugGroup(id, name) TracyGpuNamedZone( ___tracy_gpu_zone, name, makVrv::DtProfileManager::collectTracyGpuStats()); makVrv::DtGlScopedDebugGroup_ objName##line(id, name);
26 #define DtGlScopedDebugGroupC(id, name, color) TracyGpuNamedZoneC( ___tracy_gpu_zone, name,color, makVrv::DtProfileManager::collectTracyGpuStats()); makVrv::DtGlScopedDebugGroup_ objName##line(id, name);
27 #define DtGlTimedZone( name) TracyGpuNamedZone( ___tracy_gpu_zone, name, makVrv::DtProfileManager::collectTracyGpuStats());
28 
29 #define DtProfileGpuCollect TracyGpuCollect
30 #define DtProfileGpuCreateContext TracyGpuContext
31 
32 #else
33 
34 #define DtGlScopedDebugGroup(id, name) makVrv::DtGlScopedDebugGroup_ objName##line(id, name);
35 #define DtGlScopedDebugGroupC(id, name, color) makVrv::DtGlScopedDebugGroup_ objName##line(id, name);
36 #define DtGlTimedZone( name);
37 
38 #define DtProfileGpuCollect
39 #define DtProfileGpuCreateContext
40 
41 #endif
42 
43 namespace makVrv
44 {
46  {
47  public:
48  static bool debuggingEnabled(void);
49  static void setDebuggingEnabled(bool val);
50  protected:
51  static bool theDebuggingEnabled;
52  };
53 //
54 
56  {
57  public:
58  DtGlScopedDebugGroup_(unsigned int id, const char* message);
59  virtual ~DtGlScopedDebugGroup_();
60 
61 
62  protected:
64  };
65 
67  {
68  public:
69  DtGlDebugGroup(unsigned int id, const char* message);
70  virtual ~DtGlDebugGroup();
71 
72  virtual void setId(unsigned int id);
73  virtual unsigned int id(void) const;
74 
75  virtual void setMessage(const char* message);
76  virtual const std::string& message(void) const;
77 
78  virtual void start(void);
79  virtual void stop(void);
80 
81  protected:
83  unsigned int myId;
84  std::string myMessage;
85 
86  };
87 
89  {
90  public:
94  static int hasGlErrors(const int maxNumErrors = 100);
95 
97  static std::string toErrorString(int glErrorId);
98  };
99 
100 }
Dll export defines.
Definition: DtGlDebugGroup.h:66
unsigned int myId
Definition: DtGlDebugGroup.h:83
Definition: DtGlDebugGroup.h:45
static bool theDebuggingEnabled
Definition: DtGlDebugGroup.h:51
Definition: DtGlDebugGroup.h:55
Contains the classes allowing the profiler to work, DtProfileManager, DtProfileSample, and DtProfileIterator.
std::string myMessage
Definition: DtGlDebugGroup.h:84
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
Definition: DtGlDebugGroup.h:88

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)