gpuCache/gpuCacheVramQuery.h
#ifndef _gpuCacheVramQuery_h_
#define _gpuCacheVramQuery_h_
#include <maya/MTypes.h>
#include <maya/MString.h>
namespace GPUCache {
class VramQuery
{
public:
static MUint64 queryVram();
static bool isGeforce();
static bool isQuadro();
static const MString& manufacturer();
static void driverVersion(int version[3]);
private:
VramQuery(const VramQuery&);
const VramQuery& operator=(const VramQuery&);
private:
#if defined(_WIN32)
static void queryVramAndDriverWMI(MUint64& vram,
int driverVersion[3],
MString& manufacturer,
MString& model);
static MUint64 queryVramDXGI();
#elif defined(__APPLE__) || defined(__MACH__)
static void queryVramAndDriverMAC(MUint64& vram,
int driverVersion[3],
MString& manufacturer,
MString& model);
#else
static void queryVramAndDriverXORG(MUint64& vram,
int driverVersion[3],
MString& manufacturer,
MString& model);
#endif
static MUint64 queryVramOGL();
static bool isGeforceOGL();
static bool isQuadroOGL();
private:
static const VramQuery& getInstance();
VramQuery();
MUint64 fVram;
int fDriverVersion[3];
bool fIsGeforce;
bool fIsQuadro;
};
}
#endif