GlobeEngine
MemoryState.h
Go to the documentation of this file.
1 //
2 // DebugLogger.h
3 //
4 // Created by Mathias Thöny on 27.12.11.
5 // Copyright (c) 2011 University of Zurich. All rights reserved.
6 //
7 
8 #ifndef GlobeEngine_MemoryState_h
9 #define GlobeEngine_MemoryState_h
10 
11 #include "OpenGL_Includes.h"
12 #include <string>
13 
14 namespace geUtil {
15 
17  {
18  public:
19  MemoryState();
20  ~MemoryState();
21  void clear();
22  void create();
23 
24 #ifndef GENGINE_GLAPI_410_AND_LOWER
25  bool isAvailable();
31  int getATIMemoryPoolInfo(int _pool, int _param);
32 #endif
33 
34  bool checkIfAMDCard();
35  bool checkIfNVidiaCard();
36 
37  std::string getGPUVendor();
38  std::string getGPURenderer();
39  std::string getOpenGLVersion();
40  std::string getGLSLVersion();
41 
42  private:
43  bool setMemoryStatusAvailable(bool _in);
44 
45  GLint dedicatedMemory;
46  GLint totalDedicatedMemory;
47  GLint currentFreeDedicatedMemory;
48  GLint evictionCountSinceLastStart;
49  GLint evictedMemorSize;
50 
51  // Arrays used for amd memory check
52  GLint amdVertexBufferMemory[4];
53  GLint amdTextureMemory[4];
54  GLint amdRenderbufferMemory[4];
55 
56  bool memoryStatusAvailable;
57  bool isNVidiaCard;
58  bool isAMDCard;
59  };
60 }
61 #endif
bool checkIfAMDCard()
Definition: MemoryState.cpp:156
std::string getOpenGLVersion()
Definition: MemoryState.cpp:182
std::string getGLSLVersion()
Definition: MemoryState.cpp:187
std::string getGPURenderer()
Definition: MemoryState.cpp:177
Definition: MemoryState.h:16
int getNVXDedicatedGPUMemory()
Definition: MemoryState.cpp:114
std::string getGPUVendor()
Definition: MemoryState.cpp:172
~MemoryState()
Definition: MemoryState.cpp:11
int getNVXTotalDedicatedGPUMemory()
Definition: MemoryState.cpp:125
void clear()
Definition: MemoryState.cpp:16
bool checkIfNVidiaCard()
Definition: MemoryState.cpp:164
void create()
Definition: MemoryState.cpp:31
int getNVXEvictionsCountSinceLastSystemStart()
Definition: MemoryState.cpp:137
bool isAvailable()
Definition: MemoryState.cpp:42
int getNVXEvictedMemorySize()
Definition: MemoryState.cpp:143
Definition: DebugLogger.h:14
int getATIMemoryPoolInfo(int _pool, int _param)
Definition: MemoryState.cpp:86
int getNVXCurrentlyAvailableDedicatedGPUMemory()
Definition: MemoryState.cpp:131
MemoryState()
Definition: MemoryState.cpp:6