From 4360613be70bf11c298a9563ca512214c641d63b Mon Sep 17 00:00:00 2001 From: NepDisk Date: Fri, 2 Jan 2026 14:22:08 -0500 Subject: [PATCH] Request 24bit depth buffer Thanks Alug for the fix --- src/sdl/i_video.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sdl/i_video.cpp b/src/sdl/i_video.cpp index 3b7caafa4..ede7db5a6 100644 --- a/src/sdl/i_video.cpp +++ b/src/sdl/i_video.cpp @@ -1573,6 +1573,11 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen) #ifdef HWRENDER flags |= SDL_WINDOW_OPENGL; + + // Without a 24-bit depth buffer many visuals are ruined by z-fighting. + // Some GPU drivers may give us a 16-bit depth buffer since the + // default value for SDL_GL_DEPTH_SIZE is 16. + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); #endif // Create a window