# vtkRenderWindow setDeviceIndex not worked?

**URL:** https://discourse.vtk.org/t/vtkrenderwindow-setdeviceindex-not-worked/11311
**Category:** Support
**Created:** [April 26, 2023, 1:13pm UTC](https://discourse.vtk.org/t/vtkrenderwindow-setdeviceindex-not-worked/11311 "2023-04-26T13:13:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Peng\_LEE](https://discourse.vtk.org/user_avatar/discourse.vtk.org/peng_lee/32/6987_2.png) [@Peng\_LEE](https://discourse.vtk.org/u/Peng_LEE)
#### Post date: [April 26, 2023, 1:13pm UTC](https://discourse.vtk.org/t/vtkrenderwindow-setdeviceindex-not-worked/11311/1 "2023-04-26T13:13:13Z")

</div>

Dear all:  
When there are four graphic cards in my linux server, the type of card is: RTX 2070.  
And If I set the device index 0, to my vtkRenderWindow(), and then render by rotate.  
And When I open nvidia-smi mode and display the Volatile GPU-Util parameters.

To my surprise, I set the card 0 to renderWindow, But the other card, 1 or 2 card will worked in the nvidia-smi window. So I can’t control which card I want to render used.

And When I change to the other server, with 4 graphics card, type is: RTX 4000.  
And do the work again, the number set to renderWindow, and worked actually is as the same.

 ![image](https://discourse.vtk.org/uploads/default/original/2X/d/db715d66ebd640d4a4b8d52fd6839e92de5e49a9.png)

So the problem is:  
Why vtkRenderWindow().setDeviceIndex(index) is worked in RTX 4000, not it RTX 2070 or GTX 1080.

---

<div class="post-metadata">

### Author: ![Jens\_Munk\_Hansen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jens_munk_hansen/32/1215_2.png) [@Jens\_Munk\_Hansen](https://discourse.vtk.org/u/Jens_Munk_Hansen)
#### Post date: [April 26, 2023, 10:59pm UTC](https://discourse.vtk.org/t/vtkrenderwindow-setdeviceindex-not-worked/11311/2 "2023-04-26T22:59:17Z")

</div>

Have you verified that e.g. `glxgears` work on all the different GPUs to ensure that they OpenGL works as anticipated on all graphics adapters?
