OpenArena/engine

Using Wayland render results in Crash

slacka opened this issue · 5 comments

In Arch under a Wayland GNOME session, I get the following error when I try to launch OpenArena using Wayland:

[luke@lt-arch openarena-0.8.8]$ SDL_VIDEODRIVER=wayland ./openarena.x86_64 
ioq3+oa 3.0.0a_GIT_e120f49e-2018-06-16 linux-x86_64 Jul 24 2018
Have SSE support
----- FS_Startup -----
Current search path:
/home/luke/.local/share/OpenArena/baseoa
./baseoa
./baseoa/pak6-patch088.pk3 (711 files)
./baseoa/pak6-patch085.pk3 (559 files)
./baseoa/pak6-misc.pk3 (229 files)
./baseoa/pak5-TA.pk3 (139 files)
./baseoa/pak4-textures.pk3 (1753 files)
./baseoa/pak2-players.pk3 (669 files)
./baseoa/pak2-players-mature.pk3 (231 files)
./baseoa/pak1-maps.pk3 (100 files)
./baseoa/pak0.pk3 (1042 files)

----------------------
5433 files in pk3 files
execing default.cfg
execing q3config.cfg
couldn't exec autoexec.cfg
Hunk_Clear: reset the hunk ok
Gtk-Message: 14:48:09.764: GtkDialog mapped without a transient parent. This is discouraged.
----- Client Initialization -----
----- Initializing Renderer ----
-------------------------------
QKEY found.
----- Client Initialization Complete -----
----- R_Init -----
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available video device)
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available video device)
Setting r_mode -1 failed, falling back on r_mode 3
SDL_Init( SDL_INIT_VIDEO ) FAILED (No available video device)
----- Client Shutdown (Client fatal crashed: GLimp_Init() - could not load OpenGL subsystem) -----
RE_Shutdown( 1 )
Hunk_Clear: reset the hunk ok
-----------------------
GLimp_Init() - could not load OpenGL subsystem
Gtk-Message: 14:48:16.548: GtkDialog mapped without a transient parent. This is discouraged.

@slacka , The master branch of OA still use SDL1.2 for windows creation and opengl context creation, however SDL1.2 doesn't support wayland, According to here and here wayland is formally support by SDL2.0.4.

I don't know how much the SDL2 branch is working. Maybe it's okay, but I don't know (IIRC, SDL2 has some aspects that prevent it from being optimal for leilei's project).
As an alternative, I think the Yu Engine https://github.com/OAGuild/yuengine uses SDL2. (Despite it has got some nice features, normally I would not recommend using a third-party engine -as it lacks some oa-specific features-... but in case you absolutely need SDL2...)

FWIW, SDL2's not in main because the way it was implemented is an invasive all-or-nothing way (it removes SDL 1.2 which I desire very much so)

Personally i'd prefer a fix on the SDL 1.2 end of things...

Hi, what are you missing from SDL 1.2 which is preventing you from moving to SDL2 or GLFW, either of which would make OpenArena work natively on newer systems such as those built on Wayland?

Ideally SDL 1 and SDL 2 should be implemented in a non-invasive way, i.e. modular (so players can switch between original, SDL1 and SDL2 depending on their systems). IICR there was a fork where this was done.