From 8e5061f91856acc0462fb7768d58824086afcc52 Mon Sep 17 00:00:00 2001 From: bjorn Date: Mon, 19 Mar 2018 12:47:35 -0700 Subject: [PATCH] Disable depth test in lovr.graphics.fill; --- src/graphics/graphics.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/graphics/graphics.c b/src/graphics/graphics.c index d6da4d62..a4c8e052 100644 --- a/src/graphics/graphics.c +++ b/src/graphics/graphics.c @@ -1084,6 +1084,10 @@ void lovrGraphicsFill(Texture* texture) { 1, -1, 0, 0, 0, 0, 1, 0 }; + CompareMode mode; + bool write; + lovrGraphicsGetDepthTest(&mode, &write); + lovrGraphicsSetDepthTest(COMPARE_NONE, false); lovrGraphicsSetDefaultShader(SHADER_FILL); Material* material = lovrGraphicsGetDefaultMaterial(); lovrMaterialSetTexture(material, TEXTURE_DIFFUSE, texture); @@ -1095,6 +1099,7 @@ void lovrGraphicsFill(Texture* texture) { lovrMeshSetDrawRange(state.mesh, 0, 4); lovrMaterialSetTexture(material, TEXTURE_DIFFUSE, NULL); lovrMeshDraw(state.mesh, NULL, NULL, 1); + lovrGraphicsSetDepthTest(mode, write); } // Internal State