VR-Forces 5.0.1 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 #ifdef TRACY_ENABLE
17 #define TRACY_ON_DEMAND
18 #include <TracyClient/TracyOpenGL.hpp>
19 
20 #define DtGlScopedDebugGroup(id, name) TracyGpuNamedZone( ___tracy_gpu_zone, name, makVrv::DtProfileManager::collectTracyGpuStats()); DtGlScopedDebugGroup_ objName##line(id, name);
21 #define DtGlTimedZone( name) TracyGpuNamedZone( ___tracy_gpu_zone, name, makVrv::DtProfileManager::collectTracyGpuStats());
22 #define DtGlScopedDebugGroupC(id, name, color) TracyGpuNamedZoneC( ___tracy_gpu_zone, name,color, makVrv::DtProfileManager::collectTracyGpuStats()); DtGlScopedDebugGroup_ objName##line(id, name);
23 
24 #define DtProfileGpuCollect TracyGpuCollect
25 #define DtProfileGpuCreateContext TracyGpuContext
26 
27 #else
28 
29 #define DtGlScopedDebugGroup(id, name) DtGlScopedDebugGroup_ objName##line(id, name);
30 #define DtGlScopedDebugGroupC(id, name, color) DtGlScopedDebugGroup_ objName##line(id, name);
31 #define DtGlTimedZone( name) ;
32 #define DtProfileGpuCollect
33 #define DtProfileGpuCreateContext
34 
35 #endif
36 
37 #include <string>
38 
39 namespace makVrv
40 {
42  {
43  public:
44  static bool debuggingEnabled(void);
45  static void setDebuggingEnabled(bool val);
46  protected:
47  static bool theDebuggingEnabled;
48  };
49 //
50 
52  {
53  public:
54  DtGlScopedDebugGroup_(unsigned int id, const char* message);
55  virtual ~DtGlScopedDebugGroup_();
56 
57 
58  protected:
60  };
61 
63  {
64  public:
65  DtGlDebugGroup(unsigned int id, const char* message);
66  virtual ~DtGlDebugGroup();
67 
68  virtual void setId(unsigned int id);
69  virtual unsigned int id(void) const;
70 
71  virtual void setMessage(const char* message);
72  virtual const std::string& message(void) const;
73 
74  virtual void start(void);
75  virtual void stop(void);
76 
77  protected:
79  unsigned int myId;
80  std::string myMessage;
81 
82  };
83 
85  {
86  public:
90  static int hasGlErrors(const int maxNumErrors = 100);
91 
93  static std::string toErrorString(int glErrorId);
94  };
95 
96 }
Dll export defines.
Definition: DtGlDebugGroup.h:62
unsigned int myId
Definition: DtGlDebugGroup.h:79
Definition: DtGlDebugGroup.h:41
static bool theDebuggingEnabled
Definition: DtGlDebugGroup.h:47
Definition: DtGlDebugGroup.h:51
Contains the classes allowing the profiler to work, DtProfileManager, DtProfileSample, and DtProfileIterator.
std::string myMessage
Definition: DtGlDebugGroup.h:80
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
Definition: DtGlDebugGroup.h:84

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)