I am making an attempt to know how totally different variations of opengl work. I’m growing a sport aimed to assist opengl3.3 listed here are the specs of my system:
- OS: Manjaro linux
- Renderer: Mesa Intel(R) HD Graphics 520 (SKL GT2)
Once I verify my supported opengl model I get this:
$ glxinfo | grep "OpenGL model"
OpenGL model string: 4.6 (Compatibility Profile) Mesa 24.2.8-arch1.1
Moreover I’m utilizing conan to produce my dependencies, so I’m utilizing these variations:
From what I perceive opengl is backwards suitable so opengl3.3 code will work on opengl4.6, however I do not wish to use 4.6 whereas growing so I do not unintentionally use opengl4.6 options unintentionally.
At the moment I attempt to set the model to opengl3.3 in my code through this:
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_FALSE);
however then afterward I attempt to print out the present opengl model:
void print_opengl_info() {
// Get OpenGL model and renderer information
const char *model = (const char *)glGetString(GL_VERSION);
const char *vendor = (const char *)glGetString(GL_VENDOR);
const char *renderer = (const char *)glGetString(GL_RENDERER);
const char *glslVersion = (const char *)glGetString(GL_SHADING_LANGUAGE_VERSION);
// Print OpenGL model and {hardware} particulars
std::cout << "==== OpenGL Data ====" << std::endl;
std::cout << "OpenGL Model: " << model << std::endl;
std::cout << "Vendor: " << vendor << std::endl;
std::cout << "Renderer: " << renderer << std::endl;
std::cout << "GLSL Model: " << glslVersion << std::endl;
std::cout << std::endl;
However I get the next output:
==== OpenGL Data ====
OpenGL Model: 4.6 (Core Profile) Mesa 24.2.8-arch1.1
Vendor: Intel
Renderer: Mesa Intel(R) HD Graphics 520 (SKL GT2)
GLSL Model: 4.60
However now I am confused, in my thoughts if I set the window trace to three.3 then this could have returned opengl3.3, nevertheless it exhibits opengl4.6 so it isn’t utilizing the model of opengl I requested, how can I make it goal opengl3.3 appropriately?
(For much more particulars right here is the file that units up my window: https://github.com/cpp-toolbox/window/blob/primary/window.cpp)