Reputation: 2328
I want to learn modern OpenGL, so I have to use version 3.2 or higher. My drivers are updated and GPU Caps Viewer says I have version 4.3.0. So everything should be fine.
But I cannot access these versions, neither in C++ nor in Java using LWJGL.
Calling
System.out.println(glGetString(GL_VERSION));
prints "2.1.0 - Build 8.15.10.2900" (same goes for C++).
So, why can't I program with GL3.2, even if my drivers use GL4.3? And how can I fix this?
Upvotes: 2
Views: 700
Reputation: 162164
Okay, since this seems to be an Optimus related problem, and not a programming error, you'll have to configure Optimus not to use the on-board / CPU integrated graphics for your program. If this were written in C/C++ you could simply add this along your main
or WinMain
function and be done with it:
extern "C" {
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}
But this being running in a JRE that's not an option. I suggest you read this application note from NVidia on the subject: http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf
Upvotes: 2