Skip to content

Conversation

@leezer3
Copy link
Owner

@leezer3 leezer3 commented Jul 7, 2025

This PR removes completely the GL1.2 renderer.

Rationale:

Risks:

  • This change considerably narrows the hardware we support. GL4.3 is supported by Intel integrated graphics 4000 series and above, so CPUs from ~2012 onwards, or dedicated graphics cards from approximately the same era.
  • Need to check Apple. Documentation suggests they only support GL4.1 ( https://support.apple.com/en-us/101525 )- Need to check if the current build are actually running, and if not whether it's possible to downgrade to 4.3

@leezer3 leezer3 force-pushed the RemoveLegacyGL branch 2 times, most recently from cfc994c to 1c87998 Compare July 7, 2025 11:47
@leezer3
Copy link
Owner Author

leezer3 commented Jul 8, 2025

This is partially working on Apple at this point.
Something we're doing causes OpenGL to throw an invalid enum error. If OpenGL error checking is disabled, we can at least load the main menu.

Investigating, but definitely not mergable at the moment.

leezer3 added 2 commits July 9, 2025 10:40
Chucks a GL.InvalidEnum on core context, handled below
@SlavaArduino12345
Copy link

I do not support this change, because that would mean dropping support for toasters (I recently got a perfectly fine 2014ish decent Sony Vaio laptop that I found thrown away, and for some reason it refuses to use the new renderer (I checked both on Windows and on Linux Mint and Route Viewer says that the new renderer isnt available)). Isnt the project about compability, or the compability is for BVE Routes only?

@leezer3
Copy link
Owner Author

leezer3 commented Jul 12, 2025

It really depends on what you mean by compatability.

The current version has good compatability with most BVE content.
Implementing new features (see the top) is difficult enough to do once, but with any graphical feature and the new and old renderers, you're essentially having to implement the same code twice, or choose not to support it. MSTS animations would be unfeasibly slow with the GL1.2 renderer; the new renderer uses the graphics card to perform matrix transforms on thousands of vertices, but we'd have to do this on the CPU with the old renderer.

I don't have a good answer for the 'oldest' machine we should support, but something 11 years old is most likely out of mainstream support with Windows, and pushing it for running one of the heavier Linux desktop environments.

Not merging this yet, and if this goes ahead, I suspect that we'd need to link from the main site the last compatability build.

@SlavaArduino12345
Copy link

SlavaArduino12345 commented Jul 12, 2025

Why is OpenGL 4.3 being used specifically in the first place? And why you/we cant just use 4.0 or even 3.0 instead?
#1135

@leezer3
Copy link
Owner Author

leezer3 commented Jul 12, 2025

I used 4.3 when implementing keyframe animations, for shader storage buffer support

This PR revises it to 4.1, and uses uniform buffer objects instead, as well as dropping the GL1.2 code.
This is sub-optimal (uniforms are fixed, and we can't do stuff in-shader and have this propagate to the next vertex call), and I haven't yet done any speed testing.

The GL3 message needs updating.

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.

2 participants