From e59fba6cf2f50c230926e03d3ee675f87a8f1e5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Mon, 15 Apr 2024 14:42:38 +0200 Subject: [PATCH] gfx: use dd_ontop to determine depth test, again --- engine/joint/v4k.h | 1 + engine/split/v4k_renderdd.c | 1 + engine/v4k.c | 1 + 3 files changed, 3 insertions(+) diff --git a/engine/joint/v4k.h b/engine/joint/v4k.h index 9db2adc..c3daeb2 100644 --- a/engine/joint/v4k.h +++ b/engine/joint/v4k.h @@ -387205,6 +387205,7 @@ void ddraw_flush() { void ddraw_flush_projview(mat44 proj, mat44 view) { do_once dd_rs = renderstate(); + dd_rs.depth_test_enabled = !dd_ontop; dd_rs.cull_face_enabled = 0; glActiveTexture(GL_TEXTURE0); diff --git a/engine/split/v4k_renderdd.c b/engine/split/v4k_renderdd.c index 63b7de3..158177d 100644 --- a/engine/split/v4k_renderdd.c +++ b/engine/split/v4k_renderdd.c @@ -68,6 +68,7 @@ void ddraw_flush() { void ddraw_flush_projview(mat44 proj, mat44 view) { do_once dd_rs = renderstate(); + dd_rs.depth_test_enabled = !dd_ontop; dd_rs.cull_face_enabled = 0; glActiveTexture(GL_TEXTURE0); diff --git a/engine/v4k.c b/engine/v4k.c index 5a9e82c..539c35c 100644 --- a/engine/v4k.c +++ b/engine/v4k.c @@ -21745,6 +21745,7 @@ void ddraw_flush() { void ddraw_flush_projview(mat44 proj, mat44 view) { do_once dd_rs = renderstate(); + dd_rs.depth_test_enabled = !dd_ontop; dd_rs.cull_face_enabled = 0; glActiveTexture(GL_TEXTURE0);