Identifying a Computer’s GPU
// Access the cluster's resource manager:
RED::Object* resmgr = RED::Factory::CreateInstance( CID_REDResourceManager );
// Get it's graphic device interface:
RED::IGraphicDevice* idevice = resmgr->As< RED::IGraphicDevice >();
// Query the list of all GPUs on the system:
RED::Vector< RED::GPUID > gpulist;
RC_TEST( idevice->GetLocalGPUs( gpulist, false ) );
// Displaying all found GPU names:
for( int i = 0; i < (int)gpulist.size(); i++ )
{
int asicID = gpulist[i]._asicID;
int vendorID = gpulist[i]._vendorID;
RED::String name( gpulist[i]._name );
// Do whatever appropriate here!
}
The RED::IGraphicDevice::GetLocalGPUs
method retrieve all installed GPUs on the target computer. Note that some GPUs may not be found in HOOPS Luminate’s internal database. All GPUs newer than the release date of HOOPS Luminate are of course unknown to it. This means that HOOPS Luminate may not know the name of a GPU and will have no driver recommendation for it; however HOOPS Luminate knows the asicID and vendorID of the hardware, among other parameters, so it can uniquely identify it.