38#include <Inventor/STL/vector>
157 unsigned long long allocatedMemory, availableMemory;
158 dev.getMemoryInfo( allocatedMemory, availableMemory );
160 return os <<
"[GPU name]: " << dev.m_name.
toLatin1() <<
"\n" << \
161 "[Driver ver]: " << dev.m_drvVer.
toLatin1() <<
"\n" << \
162 "[Vram size]: " << (dev.m_totalMemory)/(1024*1024) <<
"MB" <<
"\n" <<
163 "[Available Vram size]: " << availableMemory/(1024*1024) <<
"MB" <<
"\n" <<
164 "[LogicalUnits]: " << dev.m_logicalUnitsCount;
183 static bool findFirstDeviceFunc(
SoDevice* device );
214 void getMemoryInfo(
unsigned long long& allocatedMemory,
unsigned long long& availableMemory )
const;
217 static void defaultDeviceInit();
220 unsigned long long m_totalMemory;
223 unsigned int m_logicalUnitsCount;
231 VideoCardType m_vcType;
234 static std::vector<SoGLDevice*> s_glDevices;
237 std::vector<SoGLScreenDevice*> m_screenDevices;
243 static int s_initRefCount;
247inline unsigned long long
250 return m_totalMemory;
256 return m_logicalUnitsCount;
Class for smart character strings.
const char * toLatin1() const
Returns the string as a Latin-1/ASCII C string.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Portable mutex c...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract device ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> OpenGL device ma...
static void initClass()
Initializes SoGLDevice.
static SoGLDevice * getDevice(int index)
Returns the SoGLDevice indicated by index (starting from 0).
static unsigned int getDevicesCount()
Returns the number of GPUs on the sytem.
static SoGLDevice * findFirstAvailableDevice()
Returns the first available device found in the system.
virtual SoGLDeviceSettings * getDeviceSettings() const
Returns an handle of the driver API allowing to modify profile of this device.
friend std::ostream & operator<<(std::ostream &os, const SoGLDevice &dev)
Prints information about this device.
unsigned int getScreenDevicesCount()
Returns the number of screen devices connected to the GL device.
virtual unsigned int getLogicalUnits() const
Returns the number of logical units on this device (i.e.
SoGLScreenDevice * getMainScreenDevice()
Returns the main screen device connected to the GL device.
virtual unsigned long long getTotalMemory() const
Returns the total memory of this device in bytes.
virtual unsigned long long getAvailableMemory() const
Returns the currently available memory of this device in bytes.
SoGLScreenDevice * getScreenDevice(int index)
Returns the SoGLScreenDevice indicated by index (starting from 0).
static void exitClass()
Cleans SoGLDevice.
virtual SbString getDeviceName() const
Returns the name of this device.
virtual SbString getDriverVersion() const
Returns the driver version of this GPU.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Device settings ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> GL Screen device...