From 6504efe0032ada117b09f1130cf9841b64c54aa7 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Sun, 1 Oct 2023 09:48:35 +0200 Subject: emscripten glClearDepth fix --- source/saw/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') diff --git a/source/saw/main.c b/source/saw/main.c index 3add53a..d67efd1 100644 --- a/source/saw/main.c +++ b/source/saw/main.c @@ -1530,7 +1530,11 @@ static void saw_frame(void) { glViewport(0, 0, frame_width, frame_height); glClearColor(.15f, .12f, .10f, 1.f); +#ifdef __EMSCRIPTEN__ + glClearDepthf(1.f); +#else glClearDepth(1.); +#endif glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); -- cgit v1.2.3