[vtkusers] VTK with NVidia Optimus

Paulo Waelkens paulo.waelkens at gmail.com
Fri Jan 1 12:42:17 EST 2016


Dear all,

I'm trying to get my VTK 6.3 application to use the NVidia GPU on my
laptop. The laptop (Dell Alienware) combines an intel HD530 with an Nvidia
GTX970m using the NVidia Optimus technology. At the moment, my application
always uses the integrated GPU, which is slow and horrible. Did any of you
figure out how to make the NVidia Optimus driver choose the discrete GPU
instead??? The laptop uses the discrete GPU for games, so it's not a
hardware problem, I'd say.

NOTE: I have both the latest intel and nvidia GPU drivers, and installed
the intel driver first (as suggested somewhere). I've built VTK 6.3 with
shared libraries and using the OpenGL2 flag.

I've followed the solutions described by nvidia, without success:
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
- set the discrete GPU as the "Preferred graphics processor" => no effect
- adding this line to my main.cpp
extern "C" { _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; }
//=>no effect

To check if the discrete GPU is being used, I use the GPU activity icon of
the nvidia control panel (
http://acer--uk.custhelp.com/app/answers/detail/a_id/9075/~/determining-which-graphics-card-is-used-with-nvidia-optimus).
The icon does work correctly, since it shows activity when games are
running (e.g. Starcraft 2).

I figured maybe I need to add the *extern "C" { _declspec(dllexport) DWORD
NvOptimusEnablement = 0x00000001; }* line in the VTK source code somewhere.
This is a bit of a wild guess, but maybe, since I'm linking to VTK
dynamically, all the OpenGL stuff is done withing the VTK dll boundaries,
so NVidia Optimus needs a hint from VTK, not from my (console) application
that uses VTK.

I'm really running out of tricks here, and was wondering if one of you
knows how to proceed.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160101/efe118c2/attachment.html>


More information about the vtkusers mailing list