From a2b61a1792a081931bd036c7b91602f360fcb96c Mon Sep 17 00:00:00 2001 From: Jani-Markus Maunus Date: Wed, 29 Nov 2017 20:44:32 +1100 Subject: [PATCH] Fixed HUD components appearing in water reflection Clear the region on which the world is rendered (vertically flipped) to create the reflection texture - otherwise regions not painted over still contain data from the previous frame, including some HUD elements in the bottom-left corner of the screen. --- source/src/rendergl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/src/rendergl.cpp b/source/src/rendergl.cpp index 9379ce3d..10981aca 100644 --- a/source/src/rendergl.cpp +++ b/source/src/rendergl.cpp @@ -668,6 +668,8 @@ void drawreflection(float hf, int w, int h, float changelod, bool refract) glScissor(sx, sy, sw, sh); glEnable(GL_SCISSOR_TEST); } + + glClear(GL_COLOR_BUFFER_BIT); // Fix HUD components appearing in reflection resetcubes();