I am making an attempt to know how completely different variations of opengl work. I’m growing a recreation meant to help opengl3.3. Listed here are my system specs:
- OS: Manjaro Linux
- Renderer: Mesa Intel(R) HD Graphics 520 (SKL GT2)
Once I test my supported OpenGL model, I get this:
$ glxinfo | grep "OpenGL model"
OpenGL model string: 4.6 (Compatibility Profile) Mesa 24.2.8-arch1.1
Additionally, I am utilizing conan to produce my dependencies, so I am utilizing these variations:
From what I perceive, opengl is backward appropriate, so opengl3.3 code will work in opengl4.6, however I do not wish to use 4.6 whereas growing, in order to not by chance use opengl4.6 options.
I am at present making an 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 I attempt to print 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
However I get the next end result:
==== OpenGL Info ====
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, for my part, if I set the window trace to three.3, this could have returned opengl3.3, but it surely reveals opengl4.6, so it’s not utilizing the opengl model I requested. How can I make it level to opengl3.3 accurately?
(For extra particulars right here is the file that configures my window: https://github.com/cpp-toolbox/window/blob/predominant/window.cpp)