turnage / valora

painting by functions
https://paytonturnage.gitbook.io/valora/
MIT License
702 stars 30 forks source link

Runtime error following example #38

Closed jcmorrow closed 4 years ago

jcmorrow commented 4 years ago

I get a runtime error when I try and follow the guide:

Error: CompilationError("ERROR: 0:1: \'\' :  version \'440\' is not supported\nERROR: 0:2: \'\' :  #version required and missing.\n")

That's all the information that's included, so I'm not even sure where to start debugging it.

turnage commented 4 years ago

I think the OpenGL version on your host is older than the one I wrote the example for.

See this list: https://en.wikipedia.org/wiki/OpenGL_Shading_Language#Versions

You can write your GLSL in a different version. There may be some differences; I am not sure. I have only used version 440.

zoosky commented 4 years ago

I get the same on a Mac MBP with macOS 10.15.2. Supported OpenGL are 4.1 https://support.apple.com/en-us/HT202823

turnage commented 4 years ago

Wow. I did not know OSX was using such an old version of OpenGL. That's nearly a decade old now.

I will look into earlier versions of GLSL to write the example in so it works for more people.

zoosky commented 4 years ago

maybe because Apple switched to Metal a few years ago https://en.m.wikipedia.org/wiki/Metal_(API)

Perhaps this is a path that helps https://gfx-rs.github.io

jcmorrow commented 4 years ago

@turnage yep, that is also what I concluded after some digging. OpenGL is technically deprecated on OSX (although the existing support probably isn't going anywhere soon from what I understand). I also tried fiddling around to fix it but I don't know enough OpenGL to be helpful here I think.