PDA

View Full Version : how to use nvidia for opengl?



ubuntu94
06-15-2013, 07:35 PM
i am new to opengl programming. i want to learn the latest version of opengl ie opengl 4.3. my laptop has both nvidia and intel graphics card. i updated my nvidia drivers to support opengl 4.3 but intel drivers still support only opengl 3.0. i am using windows 07.
how do i use opengl 4.3 with the supported nvidia driver. how to setup this environment on visual studio 2010?

tonyo_au
06-16-2013, 06:36 AM
You have to select the nVidia card in the laptop settings; then OpenGL will only see that driver - you cannot do it inside your program

mhagain
06-16-2013, 12:52 PM
You have to select the nVidia card in the laptop settings; then OpenGL will only see that driver - you cannot do it inside your program

Correction - you actually can.

The document at http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf includes information on the NvOptimusEnablement global variable which you can set in your program to force it to use the NV GPU. A secondary method is to statically link to certain libraries - again, covered by the document.

tonyo_au
06-17-2013, 12:17 AM
Thanks mhagain for that - it has been a problem for me for ages