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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)