mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add skeleton debug view
This commit is contained in:
parent
c63e19e87b
commit
cf12338a32
5 changed files with 51 additions and 6 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue