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 Pugemon
parent 35d26a771f
commit 3a78746185
No known key found for this signature in database
GPG Key ID: 472FA343B3CC3287

View File

@ -240,6 +240,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(