1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add debug mode that shows mesh buffer bounding boxes

This commit is contained in:
sfan5 2025-01-02 11:18:37 +01:00
parent 9554e3d43a
commit 4e2ca05f08
8 changed files with 70 additions and 46 deletions

View file

@ -276,9 +276,6 @@ void CAnimatedMeshSceneNode::render()
debug_mat.ZBuffer = video::ECFN_DISABLED;
driver->setMaterial(debug_mat);
if (DebugDataVisible & scene::EDS_BBOX)
driver->draw3DBox(Box, video::SColor(255, 255, 255, 255));
// show bounding box
if (DebugDataVisible & scene::EDS_BBOX_BUFFERS) {
for (u32 g = 0; g < m->getMeshBufferCount(); ++g) {
@ -290,6 +287,9 @@ void CAnimatedMeshSceneNode::render()
}
}
if (DebugDataVisible & scene::EDS_BBOX)
driver->draw3DBox(Box, video::SColor(255, 255, 255, 255));
// show skeleton
if (DebugDataVisible & scene::EDS_SKELETON) {
if (Mesh->getMeshType() == EAMT_SKINNED) {