[vtkusers] [vtk7.0][DeviceIndex]

Tianhong Lee litianhong15 at gmail.com
Mon Jun 6 04:49:48 EDT 2016


Hello EVERYONE!

my environment is  : CPU: Xeon E5-2680 v3 @2.50 GHz, GTX750 + GTX TITAN X ,
VTK 7.0, QT 5.3.2, VS2013, Windows7 x64


Now my program run on GTX750 ,i want to run the program on GTX TITAN X.


Could you please tell me if it is possible to choose graphics card in my
program?

I find the code below in vtkRenderWindow.h file:

 // Description:

 // If there are several graphics card installed on a system,

 // this index can be used to specify which card you want to render to.

 // the default is 0. This may not work on all derived render window and

 // it may need to be set before the first render.

 vtkSetMacro(*DeviceIndex*,int);

 vtkGetMacro(*DeviceIndex*,int);

 // Description:

 // Returns the number of devices (graphics cards) on a system.

 // This may not work on all derived render windows.

 virtual int GetNumberOfDevices()

 {

   return 0;

 }



I tried changing the *DeviceIndex* variable to different values but with no
effect.my code is: renWin->SetDeviceIndex(1);

hoping for help!


Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160606/27164e91/attachment.html>


More information about the vtkusers mailing list