Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support engine selection with print-gl-info argument #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

h0tw1r3
Copy link
Contributor

@h0tw1r3 h0tw1r3 commented Mar 14, 2024

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

@dukeeeey
Copy link
Collaborator

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.

@h0tw1r3
Copy link
Contributor Author

h0tw1r3 commented Mar 15, 2024

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.

@trzy
Copy link
Owner

trzy commented Mar 22, 2024

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?

@dukeeeey
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants