liballeg / allegro5

The official Allegro 5 git repository. Pull requests welcome!
https://liballeg.org
Other
1.9k stars 285 forks source link

OpenGL 3.x on macos #1443

Open j-w-c-b opened 1 year ago

j-w-c-b commented 1 year ago

I was trying to build xu4 on my mac this weekend, and ran into some issues getting it to run. It uses some GLSL shaders to smoothly scale some of the 80s graphics, but they use modern GL features which the display returned by allegro5 doesn't support on macos.

From what I can tell the issues are

I'll create a PR with my changes for this, but I started the weekend knowing nothing about shaders, so it might not be quite right, but is close.

alemart commented 1 year ago

Won't there be interoperability issues across platforms if a #version line is hard-coded into glsl_attach_shader_source() in src/opengl/ogl_shader.c as in #1444 ? Wouldn't it be preferable if the application sorted this out instead of Allegro?

https://github.com/liballeg/allegro5/blob/20df29dd32008ed86479644069fe95b01a83a7b3/src/opengl/ogl_shader.c#L127-L142