VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtGlTextureMemoryTracker.h
Go to the documentation of this file.
1 /*****************************************************************************
2 * Copyright (c) 2021 MAK Technologies, Inc.
3 * All rights reserved.
4 *****************************************************************************/
5 
9 
10 #pragma once
12 
14 
15 #include <unordered_map>
16 #include <unordered_set>
17 #include <iostream>
18 
19 namespace makVrv
20 {
32  {
33  public:
36 
38  virtual ~DtGlTextureMemoryTracker();
39 
43  DtGlTextureMemoryTracker& operator=(const DtGlTextureMemoryTracker&) = delete;
44 
45  public:
47  virtual void textureSizeChanged(unsigned int textureId);
48 
50  virtual void textureDeleted(unsigned int textureId);
51 
53  virtual void textureHandleResidencyChanged(unsigned int textureId, bool residentOrNotResident);
54 
56  virtual const DtGlTrackedTextureProperties& trackedProperties(void) const;
57 
59  virtual void printStats(std::ostream& outputStream) const;
60 
62  virtual const std::unordered_map<unsigned int, int>& textures(void) const;
63  public:
66  static void addTextureOfInterest(const std::string& name);
67 
68  protected:
69  std::unordered_map<unsigned int, int> myTrackedTextures;
70 
72 
73  static std::unordered_set<std::string> theTexturesOfInterest;
74  };
75 }
static std::unordered_set< std::string > theTexturesOfInterest
Definition: DtGlTextureMemoryTracker.h:73
Contains makVrv::DtGlTrackedTextureProperties class.
DtGlTrackedTextureProperties myProperties
Definition: DtGlTextureMemoryTracker.h:71
Dll export defines.
These properties are used in conjunction with DtGlTextureResidentMemoryTracker/DtGlTextureMemoryTrack...
Definition: DtGlTrackedTextureProperties.h:20
class to track memory for textures: -Call textureSizeChanged when the texture size changes...
Definition: DtGlTextureMemoryTracker.h:31
std::unordered_map< unsigned int, int > myTrackedTextures
Definition: DtGlTextureMemoryTracker.h:69
#define DT_DLL_VRVGRAPHICSUTILS
Definition: vrvGraphicsUtils.h:18

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)