MeVisLab Resolution Independence API
mlGPUInfo.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2009, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef ML_GPUINFO_H
14#define ML_GPUINFO_H
15
17
18#include "mlOpenGLSystem.h"
19
20ML_OPENGL_START_NAMESPACE
21
22//=============================================================================
25//=============================================================================
27{
28public:
29 // --------------------------------------------------------------------------
33 // --------------------------------------------------------------------------
35
36protected:
37 // --------------------------------------------------------------------------
41 // --------------------------------------------------------------------------
43
44public:
45 // --------------------------------------------------------------------------
48 // --------------------------------------------------------------------------
49 unsigned long getVideoMemorySizeInMB() const { return static_cast<unsigned long>(_VRAMSize>>20); }
50
51 // --------------------------------------------------------------------------
55 // --------------------------------------------------------------------------
56 unsigned long getTextureMemorySizeInMB() const { return static_cast<unsigned long>(_TRAMSize>>20); }
57
58#ifdef LINUX
59private:
61 bool detectRAMFromLinuxProcessOutput(FILE* p);
62#endif
63
64private:
65 unsigned long long _VRAMSize;
66 unsigned long long _TRAMSize;
67};
68
69ML_OPENGL_END_NAMESPACE
70#endif
Singleton class that provides hardware specific information.
Definition mlGPUInfo.h:27
unsigned long getVideoMemorySizeInMB() const
Determines the amount of video memory in megabytes that is available to the accelerated renderer of t...
Definition mlGPUInfo.h:49
GPUInfo()
This constructor must not be called from anywhere else but the getInstance() method,...
static GPUInfo & getInstance()
Returns the single existing object of this class.
unsigned long getTextureMemorySizeInMB() const
Determines the amount of texture memory in megabytes that is available to the accelerated renderer of...
Definition mlGPUInfo.h:56
#define MLOPENGL_EXPORT
Macro to put all following code into the namespace ML_NAMESPACE to avoid collisions with symbols of o...