Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoGLDevice Class Reference

VSG extension OpenGL device management class More...

#include <Inventor/devices/SoGLDevice.h>

+ Inheritance diagram for SoGLDevice:

Public Member Functions

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.
 
virtual unsigned int getLogicalUnits () const
 Returns the number of logical units on this device (i.e.
 
virtual SbString getDriverVersion () const
 Returns the driver version of this GPU.
 
virtual SoGLDeviceSettingsgetDeviceSettings () const
 Returns an handle of the driver API allowing to modify profile of this device.
 
virtual SbString getDeviceName () const
 Returns the name of this device.
 
SoGLScreenDevicegetMainScreenDevice ()
 Returns the main screen device connected to the GL device.
 
unsigned int getScreenDevicesCount ()
 Returns the number of screen devices connected to the GL device.
 
SoGLScreenDevicegetScreenDevice (int index)
 Returns the SoGLScreenDevice indicated by index (starting from 0).
 

Static Public Member Functions

static SoGLDevicefindFirstAvailableDevice ()
 Returns the first available device found in the system.
 
static unsigned int getDevicesCount ()
 Returns the number of GPUs on the sytem.
 
static SoGLDevicegetDevice (int index)
 Returns the SoGLDevice indicated by index (starting from 0).
 
static void initClass ()
 Initializes SoGLDevice.
 
static void exitClass ()
 Cleans SoGLDevice.
 
- Static Public Member Functions inherited from SoDevice
static SoDevicefind (SoDeviceFindFunction *findFunction)
 Performs a generic search on the list of devices.
 
static unsigned int getDevicesCount ()
 Returns the number of devices.
 
static SoDevicegetDevice (int index)
 Returns the SoDevice pointed by index.
 

Friends

std::ostream & operator<< (std::ostream &os, const SoGLDevice &dev)
 Prints information about this device.
 

Additional Inherited Members

- Public Types inherited from SoDevice
typedef bool SoDeviceFindFunction(SoDevice *device)
 Find function type.
 

Detailed Description

VSG extension OpenGL device management class

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.

SEE ALSO

SoCpuDevice, SoGLBufferObject, SoGLContext, SoGLScreenDevice

Definition at line 62 of file SoGLDevice.h.

Member Function Documentation

◆ exitClass()

static void SoGLDevice::exitClass ( )
static

Cleans SoGLDevice.

◆ findFirstAvailableDevice()

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.

◆ getAvailableMemory()

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.

◆ getDevice()

static SoGLDevice * SoGLDevice::getDevice ( int  index)
static

Returns the SoGLDevice indicated by index (starting from 0).

Parameters
indexThe index of the SoGLDevice.

◆ getDeviceName()

SbString SoGLDevice::getDeviceName ( ) const
inlinevirtual

Returns the name of this device.

Implements SoDevice.

Definition at line 260 of file SoGLDevice.h.

◆ getDevicesCount()

static unsigned int SoGLDevice::getDevicesCount ( )
static

Returns the number of GPUs on the sytem.

◆ getDeviceSettings()

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.

◆ getDriverVersion()

virtual SbString SoGLDevice::getDriverVersion ( ) const
virtual

Returns the driver version of this GPU.

Implements SoDevice.

◆ getLogicalUnits()

unsigned int SoGLDevice::getLogicalUnits ( ) const
inlinevirtual

Returns the number of logical units on this device (i.e.

the number of cores of this GPU).

Implements SoDevice.

Definition at line 254 of file SoGLDevice.h.

◆ getMainScreenDevice()

SoGLScreenDevice * SoGLDevice::getMainScreenDevice ( )

Returns the main screen device connected to the GL device.

◆ getScreenDevice()

SoGLScreenDevice * SoGLDevice::getScreenDevice ( int  index)

Returns the SoGLScreenDevice indicated by index (starting from 0).

Parameters
indexThe index of the SoGLScreenDevice.

◆ getScreenDevicesCount()

unsigned int SoGLDevice::getScreenDevicesCount ( )

Returns the number of screen devices connected to the GL device.

◆ getTotalMemory()

unsigned long long SoGLDevice::getTotalMemory ( ) const
inlinevirtual

Returns the total memory of this device in bytes.

Implements SoDevice.

Definition at line 248 of file SoGLDevice.h.

◆ initClass()

static void SoGLDevice::initClass ( )
static

Initializes SoGLDevice.

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const SoGLDevice dev 
)
friend

Prints information about this device.

Definition at line 155 of file SoGLDevice.h.


The documentation for this class was generated from the following file: