matus-chochlik / oglplu2

Wrapper for OpenGL, OpenAL and EGL including utilities for writing distributed applications with graphics and/or audio rendering.
Boost Software License 1.0
89 stars 11 forks source link

OS X El Capitan supports only GLSL versions 140 to 410 (Core profile) #7

Closed deranen closed 8 years ago

deranen commented 8 years ago

The Mandelbrot example doesn't work on OS X El Capitan. The linker throws an error and claims that one or more shaders didn't build correctly. I had to add fs.report_compile_error(); to see the build error output (should this added to all the examples?).

The build error message is

ERROR: 0:1: '' :  version '130' is not supported
ERROR: 0:2: '' :  #version required and missing.

The reason for this seems to be annoying and complicated, but if the #version is set to any version between 140 and 410 (inclusive), then it works fine. I think it has something to do with OS X only supporting core profile. I'm not sure how to correctly/neatly fix this. Thoughts?

matus-chochlik commented 8 years ago

I changed the version to 140 in 286e772a64a17d5cec6d1006f332645e0532f3cf

deranen commented 8 years ago

That is of course one way to fix it! Thanks.