OpenGL device management class More...
#include <Inventor/devices/SoGLDevice.h>
Public Member Functions | |
virtual unsigned long long | getTotalMemory () const |
virtual unsigned long long | getAvailableMemory () const |
virtual unsigned int | getLogicalUnits () const |
virtual SbString | getDriverVersion () const |
virtual SoGLDeviceSettings * | getDeviceSettings () const |
virtual SbString | getDeviceName () const |
SoGLScreenDevice * | getMainScreenDevice () |
unsigned int | getScreenDevicesCount () |
SoGLScreenDevice * | getScreenDevice (int index) |
Static Public Member Functions | |
static SoGLDevice * | findFirstAvailableDevice () |
static unsigned int | getDevicesCount () |
static SoGLDevice * | getDevice (int index) |
static void | initClass () |
static void | exitClass () |
Friends | |
std::ostream & | operator<< (std::ostream &os, const SoGLDevice &dev) |
This class provides functions to discover, and query information about, GPU devices available in the system through the OpenGL API. You can query, for example, the total memory available on the device.
Please see SoDevice for general information about the device classes.
See SoGLScreenDevice for information about displays attached to a GPU.
SoCpuDevice, SoCudaDevice, SoGLBufferObject, SoGLContext, SoGLScreenDevice, SoOpenCLDevice
static void SoGLDevice::exitClass | ( | ) | [static] |
Cleans SoGLDevice.
Reimplemented from SoDevice.
static SoGLDevice* SoGLDevice::findFirstAvailableDevice | ( | ) | [static] |
Returns the first available device found in the system.
Since Open Inventor version 9.7.2, this is guaranteed to be the device that Open Inventor will actually use for rendering.
virtual unsigned long long SoGLDevice::getAvailableMemory | ( | ) | const [virtual] |
Returns the currently available memory of this device in bytes.
IMPORTANT NOTE: This function may returns the same value as getTotalMemory() because of driver limitations.
Implements SoDevice.
static SoGLDevice* SoGLDevice::getDevice | ( | int | index | ) | [static] |
Returns the SoGLDevice indicated by index (starting from 0).
index | The index of the SoGLDevice. |
Reimplemented from SoDevice.
SbString SoGLDevice::getDeviceName | ( | ) | const [inline, virtual] |
Returns the name of this device.
Implements SoDevice.
static unsigned int SoGLDevice::getDevicesCount | ( | ) | [static] |
Returns the number of GPUs on the sytem.
Reimplemented from SoDevice.
virtual SoGLDeviceSettings* SoGLDevice::getDeviceSettings | ( | ) | const [virtual] |
Returns an handle of the driver API allowing to modify profile of this device.
The return is depending of the driver manufacturer (NVidia, AMD, Intel...). Returns NULL if the API is not available. E.g.: For Intel driver, NULL is always returned.
virtual SbString SoGLDevice::getDriverVersion | ( | ) | const [virtual] |
Returns the driver version of this GPU.
Implements SoDevice.
unsigned int SoGLDevice::getLogicalUnits | ( | ) | const [inline, virtual] |
Returns the number of logical units on this device (i.e.
the number of cores of this GPU).
Implements SoDevice.
SoGLScreenDevice* SoGLDevice::getMainScreenDevice | ( | ) |
Returns the main screen device connected to the GL device.
SoGLScreenDevice* SoGLDevice::getScreenDevice | ( | int | index | ) |
Returns the SoGLScreenDevice indicated by index (starting from 0).
index | The index of the SoGLScreenDevice. |
unsigned int SoGLDevice::getScreenDevicesCount | ( | ) |
Returns the number of screen devices connected to the GL device.
unsigned long long SoGLDevice::getTotalMemory | ( | ) | const [inline, virtual] |
Returns the total memory of this device in bytes.
Implements SoDevice.
static void SoGLDevice::initClass | ( | ) | [static] |
Initializes SoGLDevice.
std::ostream& operator<< | ( | std::ostream & | os, | |
const SoGLDevice & | dev | |||
) | [friend] |
Prints information about this device.