fix: render: Fix WorldRenderer::renderBlockSelection

Block selection clears before new selection be drawn
Added a call to LineBatch::flush() to ensure that all buffered data is correctly uploaded to the GPU and rendered. The missing flush() was causing rendering artifacts, such as flickering of block outlines, which has now been resolved by ensuring that all accumulated data is processed and rendered properly.
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov 2024-08-02 07:42:26 +03:00 committed by MihailRis
parent 6da85af19b
commit e399e95930

View File

@ -239,6 +239,7 @@ void WorldRenderer::renderBlockSelection() {
lineBatch->line(point, point+norm*0.5f, glm::vec4(1.0f, 0.0f, 1.0f, 1.0f));
}
}
lineBatch->flush();
}
void WorldRenderer::renderLines(