openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.94k stars 2.55k forks source link

computeShaderParticlesExample not running on macOS #7906

Closed dimitre closed 4 months ago

dimitre commented 7 months ago

different errors using XCode and make. similar issues with computeShaderTextureExample macos 13.6.4, XCode 15.2, apple silicon

d@zen computeShaderParticlesExample % make RunRelease
[ error ] ofAppGLFWWindow: 65543: Requested OpenGL version 4.3, got version 4.1
[ error ] ofAppGLFWWindow: couldn't create GLFW window
/bin/sh: line 1: 42809 Segmentation fault: 11  ./computeShaderParticlesExample
make: *** [RunRelease] Error 139
Screenshot 2024-03-03 at 10 11 53
artificiel commented 6 months ago

Well compute shader is openGL4.3, and macOS is stuck at 4.1... for that reason it's removed from the releases: https://github.com/openframeworks/openFrameworks/blob/c11edeffb5dbd6a19d88eb4687e8ddd03e7820ca/scripts/dev/create_package.sh#L312-L316 Do you mean a better error should be issued if openGL > 4.1 is requested on macOS? or should setupShaderFromFile() alarm if GL_COMPUTE_SHADER when #ifdef OF_TARGET_MAC?

what would be the ideal behaviour?

dimitre commented 6 months ago

Yes, thanks for the reminder @artificiel. Definetly it can be handled better, at least ofLogError but maybe std::exit with a message if the requested openGL version is higher than the system can provide. edit: in ofCreateWindow