简体   繁体   中英

How to set OpenGL version?

I am beginner in OpenGL, I am using latest opengl and GLFW libraries for windows context handling.

I have two graphics cards in my laptop:

  1. Intel HD Graphics 3000

  2. Nvidia GT 540 m

But when I run

const GLubyte* renderer = glGetString (GL_RENDERER); // get renderer string
const GLubyte* version = glGetString (GL_VERSION); // version as a string

printf ("Renderer: %s\n", renderer);
printf ("OpenGL version supported %s\n", version);

output:

Renderer: Intel HD Graphics 3000 OpenGL version supported 3.1.0 - Build 9.17.10.3223

My question is, how can I set default graphic card to NVIDIA and opengl version to 4.4

The videocard combo you have works in switchable mode, meaning that you can offload work to the NVIDIA when performance are needed and fall back to the (less demanding) Intel to save battery.

That said, you have either to force enable NVIDIA card from BIOS (if possible) or use Optimus / Bumblebee to launch your application with access to the NVIDIA card.

Thanks Stefano.

I found a solution to select Nvidia card for my program, using Nvidia control panel

Now my results are:

Renderer: Nvidia GT 540M OpenGL version supported 4.4.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM