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:
parent
9554e3d43a
commit
4e2ca05f08
8 changed files with 70 additions and 46 deletions
|
@ -110,11 +110,9 @@ void CMeshSceneNode::render()
|
|||
if (DebugDataVisible && PassCount == 1) {
|
||||
video::SMaterial m;
|
||||
m.AntiAliasing = 0;
|
||||
m.ZBuffer = video::ECFN_DISABLED;
|
||||
driver->setMaterial(m);
|
||||
|
||||
if (DebugDataVisible & scene::EDS_BBOX) {
|
||||
driver->draw3DBox(Box, video::SColor(255, 255, 255, 255));
|
||||
}
|
||||
if (DebugDataVisible & scene::EDS_BBOX_BUFFERS) {
|
||||
for (u32 g = 0; g < Mesh->getMeshBufferCount(); ++g) {
|
||||
driver->draw3DBox(
|
||||
|
@ -123,6 +121,10 @@ void CMeshSceneNode::render()
|
|||
}
|
||||
}
|
||||
|
||||
if (DebugDataVisible & scene::EDS_BBOX) {
|
||||
driver->draw3DBox(Box, video::SColor(255, 255, 255, 255));
|
||||
}
|
||||
|
||||
if (DebugDataVisible & scene::EDS_NORMALS) {
|
||||
// draw normals
|
||||
const f32 debugNormalLength = 1.f;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue