Skip to content

Commit

Permalink
Request 24 bit depth buffer, to prevent z-fighting.
Browse files Browse the repository at this point in the history
This should fix issue #6 with Intel and AMD gpus.
  • Loading branch information
hyperlogic committed Mar 7, 2024
1 parent d656f83 commit 423479b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sdl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ int main(int argc, char *argv[])
// Allow us to use automatic linear->sRGB conversion.
SDL_GL_SetAttribute(SDL_GL_FRAMEBUFFER_SRGB_CAPABLE, 1);

// increase depth buffer size
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);

uint32_t windowFlags = SDL_WINDOW_OPENGL;
if (app.IsFullscreen())
{
Expand Down

0 comments on commit 423479b

Please sign in to comment.