Supermodel icon indicating copy to clipboard operation
Supermodel copied to clipboard

support engine selection with print-gl-info argument

Open h0tw1r3 opened this issue 1 year ago • 4 comments
trafficstars

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

h0tw1r3 avatar Mar 14 '24 23:03 h0tw1r3

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.

dukeeeey avatar Mar 15 '24 13:03 dukeeeey

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.

h0tw1r3 avatar Mar 15 '24 17:03 h0tw1r3

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?

trzy avatar Mar 22 '24 00:03 trzy

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.

dukeeeey avatar Mar 22 '24 11:03 dukeeeey