add skeleton debug view
This commit is contained in:
@@ -240,14 +240,16 @@ void WorldRenderer::renderBlockSelection() {
|
||||
}
|
||||
}
|
||||
|
||||
void WorldRenderer::renderLines(Camera* camera, Shader* linesShader) {
|
||||
void WorldRenderer::renderLines(
|
||||
Camera* camera, Shader* linesShader, const DrawContext& pctx
|
||||
) {
|
||||
linesShader->use();
|
||||
linesShader->uniformMatrix("u_projview", camera->getProjView());
|
||||
if (player->selection.vox.id != BLOCK_VOID) {
|
||||
renderBlockSelection();
|
||||
}
|
||||
if (player->debug && showEntitiesDebug) {
|
||||
level->entities->renderDebug(*lineBatch, *frustumCulling);
|
||||
level->entities->renderDebug(*lineBatch, *frustumCulling, pctx);
|
||||
}
|
||||
lineBatch->render();
|
||||
}
|
||||
@@ -341,7 +343,7 @@ void WorldRenderer::draw(
|
||||
renderLevel(ctx, camera, settings, pause);
|
||||
// Debug lines
|
||||
if (hudVisible){
|
||||
renderLines(camera, linesShader);
|
||||
renderLines(camera, linesShader, ctx);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class WorldRenderer {
|
||||
/// @brief Render lines (selection and debug)
|
||||
/// @param camera active camera
|
||||
/// @param linesShader shader used
|
||||
void renderLines(Camera* camera, Shader* linesShader);
|
||||
void renderLines(Camera* camera, Shader* linesShader, const DrawContext& pctx);
|
||||
|
||||
/// @brief Render all debug lines (chunks borders, coord system guides)
|
||||
/// @param context graphics context
|
||||
|
||||
Reference in New Issue
Block a user