What does major and minor mean in OpenGL with GLFW?
Asked Answered
P

2

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);
Pullen answered 27/4, 2017 at 23:17 Comment(1)
did you try 4,1?Imogene
D
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.

Depute answered 27/4, 2017 at 23:24 Comment(0)
C
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'.

Childhood answered 27/4, 2017 at 23:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.