5

I was creating an OpenGL window with GLFW on some Dell PC that used integrated graphics. I thought that major means maximum and minor means minimum. However having a restricted version range of (3,3) works but a range that contains it such as (4,2) fails.

Example:

//fails
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

//fails
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);

//success
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);

//success
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);

2 Answers2

9

"Major" and "minor" are two components of a single version number, separated by a dot.

Version 4.3 is major version 4, minor version 3.

Version 3.1 is major version 3, minor version 1.

And so on.

The results of your sample code indicate that your computer probably doesn't support OpenGL 4.x contexts. You will need to stick to OpenGL 3.x or earlier.

1

When you look at version numbers of things, such as 4.3, the 4 is the 'major' part of the version, and the 3 the 'minor'.

Phil M
  • 1,619
  • 1
  • 8
  • 10