Skip to content

Add option to dynamically use OpenGL symbols on unix-like systems.#590

Merged
BrentDaMage merged 57 commits intonbcraft-org:masterfrom
Un1q32:master
May 7, 2026
Merged

Add option to dynamically use OpenGL symbols on unix-like systems.#590
BrentDaMage merged 57 commits intonbcraft-org:masterfrom
Un1q32:master

Conversation

@Un1q32
Copy link
Copy Markdown
Contributor

@Un1q32 Un1q32 commented Apr 19, 2026

It's disabled by default on non-windows because it would break static builds, which would be bad for static-only platforms like the switch. It also wouldn't help much for Linux artifact builds, since those are linked against either the flatpak runtime, which is guaranteed to have a new enough mesa, or a relatively new glibc which is much much newer than the last version of mesa to not have every required function.

Also includes major improvements to the Makefile build, and fixes for extremely old systems, such as systems with very old mesa headers, and Mac OS X 10.3.

Also adds support for GCC versions down to 2.96 (Redhat's version of GCC 3.0 beta)

Also updates the GCC version used in the Windows and macOS artifacts to 16.1.0, important because GCC 15.2.0 can't be built by 16.1.0 for some reason, so building the artifact is currently impossible on an updated Arch Linux install.

@Un1q32 Un1q32 marked this pull request as draft April 19, 2026 01:18
@Un1q32 Un1q32 force-pushed the master branch 2 times, most recently from f4dcac4 to 5e979c7 Compare April 19, 2026 01:49
@Un1q32 Un1q32 marked this pull request as ready for review April 19, 2026 01:49
@Un1q32 Un1q32 marked this pull request as draft April 19, 2026 21:54
@Un1q32 Un1q32 marked this pull request as ready for review April 19, 2026 23:58
@Un1q32 Un1q32 force-pushed the master branch 4 times, most recently from fa67bd9 to 657faab Compare April 22, 2026 04:15
Comment thread source/common/Util.cpp Outdated
Comment thread source/renderer/hal/ogl/API_OGL.cpp Outdated
Comment thread thirdparty/GL/GL.hpp Outdated
Comment thread thirdparty/raknet/RakNetSocket2.cpp
Comment thread compat/PlatformDefinitions.h Outdated
@Un1q32 Un1q32 force-pushed the master branch 4 times, most recently from 9da2455 to ead3f0e Compare April 25, 2026 23:00
Un1q32 added 14 commits May 6, 2026 04:58
previously changing headers trigger a rebuild for any sources
the way this is normally done is by passing options to the C compiler
that makes it generate a dependency file that is then included from the
makefile, but those options aren't universally supported.
Un1q32 added 16 commits May 6, 2026 04:58
The only difference between the 2 is that at() does bounds checking and
throws an exception if you try to access out of bounds, but in every
case it's used the index is tied in some way to .size(), usually by
being compared to it in a for loop, so this should always be a bit
faster with no downsides.

Also, gcc 2.96's libstdc++ doesn't support at(), which is the main
reason I'm doing this, but I'm commiting this seperately before I finish
the gcc 2.96 port because it works on it's own as an optimization.
the game still doesnt seem to work but it compiles and links now
Comment thread compat/limits.hpp Outdated
Comment thread compat/Limits_legacy.hpp
Comment thread compat/PlatformDefinitions.h
Comment thread source/client/sound/SoundData.cpp Outdated
Comment thread source/common/Util.hpp
Comment thread thirdparty/GL/glext.h
Comment thread thirdparty/raknet/SocketLayer.cpp Outdated
Comment thread thirdparty/rapidjson/document.h
Comment thread thirdparty/rapidjson/document.h
Comment thread thirdparty/rapidjson/document.h
Copy link
Copy Markdown
Member

@BrentDaMage BrentDaMage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one minor thing

Comment thread compat/Limits.hpp Outdated
@BrentDaMage BrentDaMage merged commit 1dccd3f into nbcraft-org:master May 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants