Skip to content
Snippets Groups Projects
Commit 91aeba6c authored by Hannu Hanhi's avatar Hannu Hanhi
Browse files

Request 24-bit depth buffer from SDL

Should fix problems caused by 16-bit depth buffer usage
parent 8b021ec1
Branches
Tags
No related merge requests found
...@@ -1620,6 +1620,11 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen) ...@@ -1620,6 +1620,11 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
#ifdef HWRENDER #ifdef HWRENDER
if (vid.glstate == VID_GL_LIBRARY_LOADED) if (vid.glstate == VID_GL_LIBRARY_LOADED)
flags |= SDL_WINDOW_OPENGL; 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 #endif
// Create a window // Create a window
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment