|
10 | 10 | //! I advise to check out this file, its a basic input handler
|
11 | 11 | #include "../common/QToQuitEventReceiver.h"
|
12 | 12 |
|
| 13 | +#ifdef DEBUG_AABBS |
13 | 14 | #include "nbl/ext/DebugDraw/CDraw3DLine.h"
|
| 15 | +#endif |
14 | 16 |
|
15 | 17 | using namespace nbl;
|
16 | 18 | using namespace nbl::core;
|
@@ -260,7 +262,9 @@ int main()
|
260 | 262 | auto* am = device->getAssetManager();
|
261 | 263 | auto* fs = am->getFileSystem();
|
262 | 264 |
|
| 265 | +#ifdef DEBUG_AABBS |
263 | 266 | auto draw3DLine = ext::DebugDraw::CDraw3DLine::create(driver);
|
| 267 | +#endif |
264 | 268 |
|
265 | 269 | //
|
266 | 270 | auto createScreenSizedImage = [driver,¶ms](const E_FORMAT format) -> auto
|
@@ -301,7 +305,9 @@ int main()
|
301 | 305 | //
|
302 | 306 | SceneData sceneData;
|
303 | 307 | CullShaderData cullShaderData;
|
| 308 | +#ifdef DEBUG_AABBS |
304 | 309 | core::vector<std::pair<ext::DebugDraw::S3DLineVertex, ext::DebugDraw::S3DLineVertex>> dbgLines;
|
| 310 | +#endif |
305 | 311 | {
|
306 | 312 | //
|
307 | 313 | smart_refctd_ptr<IGPUDescriptorSetLayout> perFrameDSLayout,shadingDSLayout;
|
@@ -597,7 +603,9 @@ int main()
|
597 | 603 |
|
598 | 604 | batchCullDataEnd->drawCommandGUID = packedMeshBufferData.mdiParameterOffset + i;
|
599 | 605 |
|
| 606 | +#ifdef DEBUG_AABBS |
600 | 607 | draw3DLine->enqueueBox(dbgLines, aabbs[aabbIdx], 0.0f, 0.0f, 0.0f, 1.0f, core::matrix3x4SIMD());
|
| 608 | +#endif |
601 | 609 |
|
602 | 610 | batchCullDataEnd++;
|
603 | 611 | aabbIdx++;
|
@@ -961,8 +969,10 @@ int main()
|
961 | 969 | );
|
962 | 970 | }
|
963 | 971 |
|
| 972 | +#ifdef DEBUG_AABBS |
964 | 973 | //draw aabbs
|
965 | 974 | draw3DLine->draw(camera->getConcatenatedMatrix(), dbgLines);
|
| 975 | +#endif |
966 | 976 |
|
967 | 977 | // shade
|
968 | 978 | driver->bindDescriptorSets(video::EPBP_COMPUTE,sceneData.shadeVBufferPpln->getLayout(),0u,4u,ds,nullptr);
|
|
0 commit comments