Request 24bit depth buffer

Thanks Alug for the fix
This commit is contained in:
NepDisk 2026-01-02 14:22:08 -05:00
parent f4e9889e7a
commit 4360613be7

View file

@ -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