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 
19 namespace makVrv
20 {
21  class DtDe;
22  class DtGlBuffer;
23 
26  {
27  public:
30 
32  virtual ~DtBufferTypeProperties();
33 
34  public:
38  uint64_t myBuffersSize;
39 
43 
46  uint64_t myMaxBuffersSize;
47  };
48 
81  {
82  public:
85 
87  virtual ~DtGlBufferMemoryTracker();
88 
91 
93  DtGlBufferMemoryTracker& operator=(const DtGlBufferMemoryTracker&) = delete;
94  public:
96  virtual void bufferSizeChanged(unsigned int bufferId) override;
97 
99  virtual void bufferDeleted(unsigned int bufferId) override;
100 
102  virtual const DtBufferTypeProperties& properties(void) const;
103 
105  virtual const std::unordered_map<unsigned int, int>& buffers(void) const;
106 
108  virtual std::string bufferName(unsigned int id) const;
109 
110  protected:
112  virtual void printProperties();
113 
114  protected:
117 
118  std::unordered_map<unsigned int, int> myTrackedBuffers;
119  };
120 }
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:46
These properties are used in conjunction with DtGlBufferMemoryTracker.
Definition: DtGlBufferMemoryTracker.h:25
std::unordered_map< unsigned int, int > myTrackedBuffers
Definition: DtGlBufferMemoryTracker.h:118
int myMaxNumBuffers
All time number of buffers of this type. This is the maximum value myNumBuffers has ever attained dur...
Definition: DtGlBufferMemoryTracker.h:42
DtBufferTypeProperties myBufferProperties
properties of the buffers being tracked
Definition: DtGlBufferMemoryTracker.h:116
This class is used to track buffers&#39; memory as they are created/deleted.
Definition: DtGlBufferMemoryTracker.h:80
uint64_t myBuffersSize
size of buffers (in bytes) of this type at a given point
Definition: DtGlBufferMemoryTracker.h:38
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:36
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18
Contains makVrv::DtGlBufferListener class.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)