TheForceEngine icon indicating copy to clipboard operation
TheForceEngine copied to clipboard

Drop GLEW in favour of built-in GLAD

Open mlauss2 opened this issue 1 year ago • 2 comments

Drop GLEW in favor of GLAD-generated built-in loader.

  • This drops an extra external library dependency (glew)
  • On Linux no system OpenGL libraries/headers are required to build TFE any more
  • All the platform specific stuff (windowing, library loading, symbol resolution) is now fully handled by SDL2, no more wayland workarounds necessary (i.e. #386 )

The GLAD loader is GL4.6, while TFE's minimum is still GL3.3; the Anisotropy stuff, which is core GL4.5, has been wrapped around availability of EXT_texture_filter_anisotropic (which most GL2 drivers support).

This PR also updates ImGUI to version 1.90.9 because after the current in-tree 1.72 it also dropped GLEW.

This should also fix #395 which was caused by TFE explicitly linking to an OpenGL library, which, after this PR, is no longer necessary.

After his PR, the dependencies change to:

-Shared library: [libOpenGL.so.0]
-Shared library: [libGLX.so.0]
-Shared library: [libGLU.so.1]
-Shared library: [libGLEW.so.2.2]
-Shared library: [libGL.so.1]
-Shared library: [libX11.so.6]
 Shared library: [libSDL2-2.0.so.0]
 Shared library: [libSDL2_image-2.0.so.0]
 Shared library: [librtmidi.so.7]

i.e. no explicit dependency on OpenGL and windowing system, just SDL2.

mlauss2 avatar Jun 27 '24 10:06 mlauss2

editor needs more imgui fixing

mlauss2 avatar Jul 09 '24 07:07 mlauss2

I fixed up the non-opening modal windows in the editor.

mlauss2 avatar Jul 09 '24 10:07 mlauss2

I've also now tested this successfully on Windows as well.

mlauss2 avatar Jul 13 '24 12:07 mlauss2

I've split the 2 patches into separate PRs (with #421 to start)

mlauss2 avatar Jul 15 '24 07:07 mlauss2

I don't have any specific attachment to GLEW (other than using it in several projects), so this seems fine. I will patch it in after the next release.

luciusDXL avatar Jul 15 '24 18:07 luciusDXL