Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL 4.6 but get GL3W_ERROR_OPENGL_VERSION #72

Closed
OrKaraz opened this issue Jun 11, 2021 · 2 comments
Closed

OpenGL 4.6 but get GL3W_ERROR_OPENGL_VERSION #72

OrKaraz opened this issue Jun 11, 2021 · 2 comments

Comments

@OrKaraz
Copy link

OrKaraz commented Jun 11, 2021

Hi,

In my project, when i init OpenGL with gl3wInit i have an error : GL3W_ERROR_OPENGL_VERSION

The code below (get from here) return strange value. I have put it in the parse_version function.

int major, minor;
glGetIntegerv(GL_MAJOR_VERSION, &major);
glGetIntegerv(GL_MINOR_VERSION, &minor);
printf("%d.%d\n", major, minor);

printf return : 0.1275

any solution ? Thanks for help

OpenGL

@skaslev
Copy link
Owner

skaslev commented Jun 11, 2021

Can you post a more complete code sample for how you create OpenGL context?

You probably have to request core profile context. In glut goes something along the lines of

	glutInit(&argc, argv);
	glutInitContextVersion(4, 6);
	glutInitContextProfile(GLUT_CORE_PROFILE);

or

	glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
	glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
	glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);

for glfw.

@OrKaraz
Copy link
Author

OrKaraz commented Jun 11, 2021

Hi,

My bad, wrong copy/paste from example.

Thanks

@OrKaraz OrKaraz closed this as completed Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants