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.
This commit is contained in:
Jani-Markus Maunus
2017-11-29 19:45:16 +01:00
committed by aurhat
parent c9d9b752a1
commit a2b61a1792
+2
View File
@@ -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();