sdl-gpu
sdl-gpu copied to clipboard
GLSL version #120 is no longer supported on the Mac
I got SDL_GPU working by changing the code to change the version from #120 to #150, and rewriting the shaders to be 150-compliant:
- shader inputs are 'in' not 'attribute'
- shader outputs are 'out' not 'varying'
- fragment shader outputs go to a user-defined 'out vec4 fragColor' instead of a predefined gl_FragColor
- fragment shader 'texture2D' calls are just 'texture' calls
This because on OSX Monterey at least, I see in the 'GPU_Renderer' struct:
min_shader_version int 150 max_shader_version int 410
... so it fails to load the #version 120 code.