CHAI3DCHAI3D

normal Error when i try to change opengl to high version

More
01 Nov 2017 16:18 #1

I try to change the opengl version in some examples, the original version was set to 2.1 by the two lines:
// set OpenGL version
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);

And when i try to change it to a above version like 3.3, it failed and error comes: "GLEW has not been initialized. Please call glewInit() before initializing any shader." But i did call glewInit(), it runs successfully in the version 2.1~3.1.
And i noticed all shaders used in examples are "#version 120", but i need to use a higher version of that. Does anyone know how to modify the source code or do something else to change to a higher opengl/glsl version?

Please Log in or Create an account to join the conversation.

More
15 Nov 2017 13:48 #2

Are you running on macOS by any chance?

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum