Linux: update GLEW to 2.2.0, and enable EGL support in GLEW to match wxWidgets #1053
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On Linux, wxGTK by default attempts to use EGL if it is available on the system, rather than GLX. Unfortunately, the ancient version of GLEW that we packaged in did not support EGL, and even if it did, the configuration was not set up to enable EGL. To solve this, we:
upgrade GLEW to version 2.2.0, from upstream GitHub
modify the Bambu build process to enforce that we use GLEW from the built dependency
remove the "extra" even older GLEW that was packaged
modify GLEW's CMake configuration to enable EGL support when it is available on the system (using the same test as wxWidgets uses to decide whether to enable EGL support); if EGL isn't available at compile time, both GLEW and wxWidgets will fall back on GLX
Note that you probably will have to blow away your CMakeCache for this to work correctly -- otherwise, you may end up with the system GLEW, if you have one installed (which is probably not what you want -- on Ubuntu, the system GLEW is GLX, not EGL).
This supersedes #923.