VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGlBufferMemoryTracker.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2022 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
12 
14 
15 #include <map>
16 #include <unordered_set>
17 #include <unordered_map>
18 #include <string>
19 
20 namespace makVrv
21 {
22  class DtDe;
23  class DtGlBuffer;
24 
27  {
28  public:
31 
33  virtual ~DtBufferTypeProperties();
34 
35  public:
39  uint64_t myBuffersSize;
40 
44 
47  uint64_t myMaxBuffersSize;
48  };
49 
82  {
83  public:
86 
88  virtual ~DtGlBufferMemoryTracker();
89 
92 
94  DtGlBufferMemoryTracker& operator=(const DtGlBufferMemoryTracker&) = delete;
95  public:
97  virtual void bufferSizeChanged(unsigned int bufferId) override;
98 
100  virtual void bufferDeleted(unsigned int bufferId) override;
101 
103  virtual const DtBufferTypeProperties& properties(void) const;
104 
106  virtual const std::unordered_map<unsigned int, int>& buffers(void) const;
107 
109  virtual std::string bufferName(unsigned int id) const;
110 
111  protected:
113  virtual void printProperties();
114 
115  protected:
118 
119  std::unordered_map<unsigned int, int> myTrackedBuffers;
120  };
121 }
Dll export defines.
uint64_t myMaxBuffersSize
all time max size of buffers (in bytes) of this type This is the maximum value myBuffersSize has ever...
Definition: DtGlBufferMemoryTracker.h:47
These properties are used in conjunction with DtGlBufferMemoryTracker.
Definition: DtGlBufferMemoryTracker.h:26
std::unordered_map< unsigned int, int > myTrackedBuffers
Definition: DtGlBufferMemoryTracker.h:119
int myMaxNumBuffers
All time number of buffers of this type. This is the maximum value myNumBuffers has ever attained dur...
Definition: DtGlBufferMemoryTracker.h:43
DtBufferTypeProperties myBufferProperties
properties of the buffers being tracked
Definition: DtGlBufferMemoryTracker.h:117
This class is used to track buffers&#39; memory as they are created/deleted.
Definition: DtGlBufferMemoryTracker.h:81
uint64_t myBuffersSize
size of buffers (in bytes) of this type at a given point
Definition: DtGlBufferMemoryTracker.h:39
An abstract class to track a DtGlBuffer and its properties (size, residency, etc) Each DtGlBuffer can...
Definition: DtGlBufferListener.h:31
int myNumBuffers
number of buffers of this type at a given point
Definition: DtGlBufferMemoryTracker.h:37
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
Contains makVrv::DtGlBufferListener class.

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)