Closed AndreaCatania closed 9 months ago
Hello,
Can I ask what the use case for this is? There is quite a bit of code inside the physics engine (besides the official draw calls like PhysicsSystem::DrawBodies) that draws stuff, so I would not recommend enabling the debug renderer in a distribution build as it introduces overhead even if you're not calling draw functions yourself.
What the sample app does in distribution mode is to use Shape::GetTrianglesStart
to display the state of the world. See:
Also, shouldn't there be an option(DEBUG_RENDERER OFF)
in CMakeLists.txt then?
We are building a game-engine-like App that allows the users to implement their games. For them is good to be able to visualize the physics engine colliders, and the DebugRenderer is the perfect tool for doing that (considering all the built-in functionalities it provides, like the LOD, that we should re-implement if we would use Shape::GetTrianglesStart
).
The extra overhead is a price we are willing to pay right now, considering that the physics engine is not a bottleneck at the moment.
Also, shouldn't there be an option(DEBUG_RENDERER OFF) in CMakeLists.txt then?
I'm not a CMake expert, can you please guide me on what to do exactly? Should I add option(DEBUG_RENDERER OFF)
in:
I'll patch it up for you.
@jrouwe Thanks!
Introduces the possibility to enable the debug renderer even when compiling Jolt in distribution.