Error when i try to change opengl to high version
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
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?