dhewm3/neo/renderer
Daniel Gibson 699779e9ca Make window alpha chan opaque on Wayland, fix #426
For some reason Wayland thought it would be clever to be the only
windowing system that (non-optionally) uses the alpha chan of the
window's default OpenGL framebuffer for window transparency.
This always caused glitches with dhewm3, as Doom3 uses that alpha-chan
for blending tricks (with GL_DST_ALPHA) - especially visible in the main
menu or when the flashlight is on.
So far the workaround has been r_waylandcompat which requests an OpenGL
context/visual without alpha chan (0 alpha bits), but that also causes
glitches.
There's an EGL extension that's supposed to fix this issue
(EGL_EXT_present_opaque), and newer SDL2 versions use it (when using
the wayland backend) - but unfortunately the Mesa implementation is
broken (seems to provide a visual without alpha channel even if one was
requested), see https://gitlab.freedesktop.org/mesa/mesa/-/issues/5886
and https://github.com/libsdl-org/SDL/pull/4306#issuecomment-1014770600
for the corresponding SDL2 discussion

To work around this issue, dhewm3 now disables the use of that EGL
extension and (optionally) makes sure the alpha channel is opaque at
the end of the frame.
This behavior is controlled with the r_fillWindowAlphaChan CVar:
If it's 1, this always is done (regardless if wayland is used or not),
if it's 0 it's not done (even on wayland),
if it's -1 (the default) it's only done if the SDL "video driver" is
  wayland (this could be easily enhanced later in case other windowing
  systems have the same issue)

r_waylandcompat has been removed (it never worked properly anyway),
so now the window always has an alpha chan
2022-02-05 16:34:34 +01:00
..
Cinematic.cpp Replace libjpeg with stb_image.h 2021-04-27 20:08:59 +02:00
Cinematic.h Fix all whitespace errors 2011-12-10 15:35:54 +01:00
draw_arb2.cpp Use idStr::Copynz() instead of strncpy() 2022-01-08 16:58:48 +01:00
draw_common.cpp Do gamma correction (r_gamma, r_brightness) in shaders 2021-06-20 03:36:39 +02:00
GuiModel.cpp Fix rendering of ingame GUIs with r_lockSurfaces 1 2021-06-15 03:27:52 +02:00
GuiModel.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Image.h Remove the monochrome hack 2012-07-20 00:13:02 +02:00
Image_files.cpp Replace libjpeg with stb_image.h 2021-04-27 20:08:59 +02:00
Image_init.cpp s/referneces/references 2021-01-15 18:00:25 +01:00
Image_load.cpp Fix crash if both image_useCache and image_downSize are 1 2021-04-28 00:04:24 +02:00
Image_process.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Image_program.cpp Fix crash when selecting nonexistant texture in D3Radiant 2019-03-10 05:11:33 +01:00
Interaction.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Interaction.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Material.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Material.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
MegaTexture.cpp Get rid of some compiler warnings 2012-11-13 23:24:13 +01:00
MegaTexture.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model.cpp Fix loading .ASE models with no materials 2021-05-19 02:48:31 +02:00
Model.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_ase.cpp Fix "black box" effect on ase meshes 2012-07-18 19:53:08 +02:00
Model_ase.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_beam.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_liquid.cpp Fix several bugs from iodoom3 bugtracker 2012-06-02 10:12:22 +02:00
Model_local.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_lwo.cpp Fix "unreachable code" warnings 2012-01-15 14:13:44 +01:00
Model_lwo.h Fix all whitespace errors 2011-12-10 15:35:54 +01:00
Model_ma.cpp revert changes committed in error 2017-04-02 00:42:28 +01:00
Model_ma.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_md3.cpp s/LittleLong/LittleInt/ to match the return type 2012-06-28 13:02:47 +02:00
Model_md3.h Fix all whitespace errors 2011-12-10 15:35:54 +01:00
Model_md5.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_prt.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
Model_sprite.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
ModelDecal.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
ModelDecal.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
ModelManager.cpp More logging cleanup 2012-07-20 00:12:55 +02:00
ModelManager.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
ModelOverlay.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
ModelOverlay.h Fix all whitespace errors 2011-12-10 15:35:54 +01:00
qgl.h Fix compatibility with Mac OSX 10.4 and 10.5 2021-10-12 19:07:41 +02:00
qgl_proc.h Make window alpha chan opaque on Wayland, fix #426 2022-02-05 16:34:34 +01:00
RenderEntity.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
RenderSystem.cpp Do gamma correction (r_gamma, r_brightness) in shaders 2021-06-20 03:36:39 +02:00
RenderSystem.h Make window alpha chan opaque on Wayland, fix #426 2022-02-05 16:34:34 +01:00
RenderSystem_init.cpp Add support for GL_ATI_separate_stencil 2021-10-12 19:32:32 +02:00
RenderWorld.cpp Remove R_LockSurfaceScene(), clean up temporary changes 2021-06-15 03:27:52 +02:00
RenderWorld.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
RenderWorld_demo.cpp Use idStr::Copynz() instead of strncpy() 2022-01-08 16:58:48 +01:00
RenderWorld_load.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
RenderWorld_local.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
RenderWorld_portals.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
simplex.h Fix all whitespace errors 2011-12-10 15:35:54 +01:00
stb_image.h Update stb_vorbis to v1.22 and stb_image to v2.27 2021-10-31 06:14:59 +01:00
tr_backend.cpp Make window alpha chan opaque on Wayland, fix #426 2022-02-05 16:34:34 +01:00
tr_deform.cpp Turn a Warning() in R_FlareDeform into a DPrintf() 2012-01-03 18:14:21 +01:00
tr_font.cpp Fix fonts on Big Endian systems, fixes #148 2021-01-14 12:25:22 +01:00
tr_guisurf.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
tr_light.cpp Remove the deprecated arb renderer 2012-07-20 00:13:02 +02:00
tr_lightrun.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
tr_local.h Add absolute mouse mode and refactor mouse grabbing code 2022-01-10 00:46:32 +01:00
tr_main.cpp Remove R_LockSurfaceScene(), clean up temporary changes 2021-06-15 03:27:52 +02:00
tr_orderIndexes.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
tr_polytope.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
tr_render.cpp r_lockSurfaces: Cleaner handling of view matrix creation etc 2021-06-15 03:27:52 +02:00
tr_rendertools.cpp Get rid of GLimp_EnableLogging 2012-01-02 15:44:00 -05:00
tr_shadowbounds.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
tr_stencilshadow.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
tr_subview.cpp r_lockSurfaces: Make mirrors look only a bit broken 2021-06-15 03:27:52 +02:00
tr_trace.cpp Use idSys::GetMilliseconds() for idTimer 2011-12-22 10:38:39 +01:00
tr_trisurf.cpp Prevent stackoverflow in R_DeriveTangentsWithoutNormals() 2020-01-11 15:39:34 +01:00
tr_turboshadow.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
VertexCache.cpp Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00
VertexCache.h Untangle the epic precompiled.h mess 2011-12-19 23:21:47 +01:00