Supermodel
Supermodel copied to clipboard
support engine selection with print-gl-info argument
print-gl-info always defaults to legacy, which on mac at least, returns unexpected info. with this PR the default engine is now new3d, or whatever is globally configured.
Before (only lines that changed):
GPU info: 2.1 Metal - 88
Version : 2.1 Metal - 88
Shading Language Version : 1.20
After
GPU info: 4.1 Metal - 88 (core profile)
Version : 4.1 Metal - 88
Shading Language Version : 4.10
Also supports specifying the engine and printing info, eg supermodel -legacy3d -print-gl-info
for gpu info maybe more useful to get the max supported opengl version? This works on windows ... just not on apple because it doesn't support compatibility profiles.
for gpu info maybe more useful to get the max supported opengl version? This works on windows ... just not on apple because it doesn't support compatibility profiles.
I think the expectation is to show what is initialized by SDL. This PR simply makes it accurate to the selected engine.
Is there a way to determine the maximum GL version on macOS?
I can see this being useful but if the legacy engine is broken on macOS, seems moot and we should do away with -legacy3d there. Then on Windows and Linux this becomes somewhat irrelevant?
I don't think you can, you just have to create a context and see if it fails or not. But the tilegen I rewrote for opengl 3+ because it uses unsigned integer maths. It can't work with a gl 2.1 context. The only way to make it work on apple is to port the legacy renderer to opengl 4 and create a 4.1 context. Really not worth the hassle unless the performance of the new renderer is THAT bad under apple.