While many people come here with issues about contexts higher than 3, I want to create a context of a lower version.
My hardware supports OpenGL version 3.3. I create an OpenGL context using glfw3
and it reports that v3.3 context was created. But I want to check my code for lower versions compatibility and create a lower version context.
I tried
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR,2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR,0);
or
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR,2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR,0);
glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT,GL_TRUE);
but version remained 3.3.
So how do I create a lower version context with glfw
? Or maybe there is any other way to limit OpenGL version? For example using driver settings or environment variables.