MacOS OpenGL version 430 not supported.
Hi, is there any way to resolve this issue?
Hi, could you try changing the version to 330 in all the shader files?
#version 330
Tried, but no luck. And also GLUT on MacOS seems impossible to set OpenGL context profile version.
I'll have to look into. Could you share the error that your getting?
It's shader compiling error. I know that I can write an alternative shader for it, but it'll be great if you can look into it.
ERROR: 0:1: '' : version '330' is not supported ERROR: 0:1: '' : syntax error: #version ERROR: 0:7: 'layout' : syntax error: syntax error
You are right, GLUT is the issue here. It seems that GLUT uses X11 which does not support OpenGL > 2.1 on OS X. I would need to either migrate the project to GLFW or rewrite the shaders for 2.1.
I think its probably best migrate to GLFW for the long term so I've create this issue #6 , but as a short term solution I'll try to rewrite the shaders for OS X.
I've added a temporary fix for OSX in this branch osx-fix. Let me know if it works out.
I think for phong.fshader and pick.fshader, we need to change in to varying.
I also changed a bit of the shader compiling function, because my compiler won't compile otherwise.
GLint len = std::strlen(source);
glShaderSource(handle, 1, ptrs, &len);
But after doing so, I'm still having issues at runtime. The app just crashes, with error message
ERROR: 0:21: '<' : syntax error: syntax error Exception caught: Failed to compile shader.
That's strange. Alright, I'll have to setup my mac to investigate this issue on it.