logo

blog

My website can't be that messy, right? git clone https://hacktivis.me/git/blog.git
commit: e889d18fbe615fb12429d6403294810906f2d56e
parent e05895b1e61cef254bd8c38b8484fa9870d239f3
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 20 Dec 2020 22:37:17 +0100

notes/pure-wayland: GLEW + EGL compiled!

Diffstat:

Mnotes/pure-wayland.shtml23+++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/notes/pure-wayland.shtml b/notes/pure-wayland.shtml @@ -13,7 +13,7 @@ You can find this kind of similar setup in embedded systems (ie. SailfishOS), as X11 makes no sense outside of keyboard+mouse setups, but I don't expect it until a bunch of years for regular desktops (say when X.Org will have died), I'm doing this right now to avoid having to rush to get rid of X11 with having to push the End-of-Life date way back it's upstream date (that happened with python-2 because it wasn't much prepared until the last year or two).<br/> It's also the kind of setup that I expect soon in security-oriented systems because Wayland addresses a number of design flaws. </p> - <p>Testing is done on Gentoo Linux with <code>USE="-X -XWayland"</code> and with the <a href="https://swaywm.org">Sway compositor</a>.</p> + <p>Testing is done on Gentoo Linux with <code>USE="-X -XWayland"</code> and <code><kbd>-DEGL_NO_X11</kbd></code> into the <code>C(XX)FLAGS</code>. And launched into the <a href="https://swaywm.org">Sway compositor</a>.</p> <p>Reminder: <dl> <dt>static linking</dt><dd>(<code>LDFLAGS="-static"</code>) some of the library is copied in the executable</dd> @@ -31,10 +31,14 @@ <li><a href="http://freeglut.sourceforge.net/">FreeGLUT: free OpenGL utility toolkit</a>: Maybe, compiles but untested</li> <li><a href="https://liballeg.org/">allegro-4</a>: Maybe, compiles with OpenGL enabled</li> <li><a href="https://liballeg.org/">allegro-5</a>: Sort of, OpenGL on it pulls <code>GL/glx.h</code> but can be disabled</li> + <li><a href="http://glew.sourceforge.net/">GLEW: OpenGL Extension Wrangler Library</a>: <a href="https://github.com/nigels-com/glew/issues/172">Not really</a>, consider <a href="https://github.com/anholt/libepoxy#why-not-use-libglew">libepoxy</a> or <a href="https://glbinding.org/">glbinding</a> (drop-in). I managed to get it to compile with:<ul> + <li>Applying <a href="https://github.com/nigels-com/glew/pull/216/commits/584a266e71c3c3f7ec4a0e4e61c31b67f80a2419">Extend GLEW API to support glewContextInit - GL without implied GLX, … #216</a></li> + <li>Running <code><kbd>sed -i 's/-lGL/-lOpenGL/' config/Makefile.linux-egl</kbd></code></li> + <li>Passing <code>POPT="${CFLAGS} <kbd>-D__native_client__</kbd>"</code> and <code><kbd>SYSTEM=linux-egl</kbd></code> to make options, for both build and install</li> + </ul></li> <li><a href="https://www.fltk.org/">FLTK</a>: Nope, could be there in the future(1.4.x) see <a href="https://www.fltk.org/str.php?L3371">STR #3371</a></li> <li><a href="https://www.tcl.tk/">TCL/TK</a>: Nope, but there is <a href="http://www.androwish.org/home/wiki?name=undroidwish">undroidwish</a> apparently supporting it, <a href="https://wiki.tcl-lang.org/page/GSoC+Idea%3A+Tk+Backend+for+the+Wayland+Display+Protocol">GSoC idea page</a></li> <li><a href="http://irrlicht.sourceforge.net/">irrlicht</a>: Nope, <a href="http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&amp;t=52107">there is some community work on it</a></li> - <li><a href="http://glew.sourceforge.net/">GLEW: OpenGL Extension Wrangler Library</a>: <a href="https://github.com/nigels-com/glew/issues/172">Nope</a>, consider <a href="https://github.com/anholt/libepoxy#why-not-use-libglew">libepoxy</a> or <a href="https://glbinding.org/">glbinding</a> (drop-in)</li> <li><a href="https://www.sfml-dev.org/">SFML: Simple and Fast Multimedia Library</a>: <a href="https://github.com/SFML/SFML/issues/1082">Nope</a></li> </ul> @@ -48,21 +52,29 @@ </ul> <h2>Games</h2> + <h3>Just Works</h3> <ul> - <li><a href="https://github.com/fmang/oshu">oshu</a>: Yes, just Works thanks to it being pure SDL2</li> + <li><a href="https://github.com/fmang/oshu">oshu</a>: Yes, just Works (SDL2)</li> <li><a href="https://parallelrealities.itch.io/blob-wars-attrition">Blob Wars : Attrition</a>: Yes, Just Works (SDL2)</li> <li><a href="https://github.com/TerryCavanagh/vvvvvv">VVVVVV</a>: Yes, Just Works (SDL2)</li> <li><a href="https://github.com/Xenoveritas/abuse">abuse</a> (Crack.Com): Yes, Just Works</li> <li><a href="https://github.com/sergiou87/open-supaplex">open-supaplex</a>: Just Works</li> + </ul> + <h3>Needed a bit of work</h3> + <ul> <li><a href="https://supertux.org/">SuperTux</a>: <del>No, because of GLEW</del> Yes, changed it's build configuration to use <a href="https://glbinding.org/">glbinding</a></li> + <li><a href="http://endless-sky.github.io/">endless-sky</a>: Almost, had to change linking from <code>GL</code> to <code>OpenGL</code> in <code>SConstruct</code>, no proper detection done</li> <li><a href="http://www.freeciv.org/">freeciv</a>: Yes(SDL2 and Qt5 clients) and No(GTK+2 client, the default/goto one)</li> <li><a href="https://supertuxkart.net/">SuperTuxKart</a>: Quite, works in wayland with gles2(because irrlicht tries to dynamically load <code>libGL.so.1</code> otherwise) in current git (<code>9f1ae2b7619f21546cc5cdd4bbeea53492d4b7ac</code>)</li> <li><a href="https://7kfans.com/">seven-kingdoms</a>: Seems to work fine</li> <li><a href="https://github.com/FWGS/xash3d-fwgs">Xash3D FWGS</a> + <a href="https://github.com/FWGS/hlsdk-xash3d">HLSDK Xash3D</a>: Yes, has some glitches but seems unrelated to Wayland. Note: You need to set <code>SDL_VIDEO_GL_DRIVER=libOpenGL.so</code> or <code>BOX86_LIBGL=libOpenGL.so</code></li> + </ul> - <li><a href="http://www.wesnoth.org">wesnoth</a>: Not really, some basic actions are broken</li> + <h3>Doesn't works</h3> + <ul> + <li><a href="http://www.wesnoth.org">wesnoth</a>: No, some basic actions are broken</li> <li><a href="https://viewizard.com">astromenace</a>: No, window fades from white to black, still get proper sound, including input feedback</li> <li><a href="https://neverball.org">neverball</a>: No, Fails at runtime <details><summary>log</summary> <pre>$ <kbd>neverball</kbd> @@ -74,15 +86,14 @@ Missing required OpenGL extension (ARB_point_parameters) it done did a broke (SEGV) </pre></details></li> <li><a href="https://www.openra.net/">OpenRA</a>: No, fails at runtime. <code>Unsupported OpenGL version: OpenGL ES 3.2 Mesa 20.1.10</code></li> + <li><a href="https://www.bzflag.org/">bzflag</a>: No, sets <code>-lX11</code> without testing at configuration time, needs <code>sed -i 's;\[opengl32 GL GL2\];[opengl32 GL GL2 OpenGL];' configure.ac</code> and depends on GLEW</li> <li><a href="https://www.xonotic.org/">xonotic</a>: No, depends on X11</li> - <li><a href="https://www.bzflag.org/">bzflag</a>: No, depends on GLEW also needs a simple patch to search for <code>-lOpenGL</code></li> <li><a href="https://www.bay12games.com/dwarves">dwarf fortress</a>: No, hard-depends on GTK2+ and libSDL-1</li> <li><a href="http://armagetronad.org/">armagetronad</a>: No, even in the current SDL2 branch</li> <li><a href="http://www.secretmaryo.org/">Secret Maryo Chronicles</a>: No, hard depends on X11</li> <li><a href="https://secretchronicles.org/">TSC: The Secret Chronicles of Dr. M.</a>: No, because of SFML</li> <li><a href="https://github.com/Anuken/Mindustry">Mindustry</a>: Nope, <code>libsdl-arc64.so</code> is shared linked against <code>libGL.so.1</code></li> <li><a href="http://oolite.org/">oolite</a>: Nope, <a href="https://github.com/OoliteProject/oolite/issues/222">still on SDL-1.2</a></li> - <li><a href="https://github.com/endless-sky/endless-sky">endless-sky</a>: No, hard-depends on GLEW</li> </ul> <h2>Multimedia</h2>