Simpler debug renderer interface? #1018
Replies: 4 comments 2 replies
-
The immediate mode debug renderer in Bullet would instantly kill my fps, but it was decent enough to be able to create smaller worlds with test cases and resolve issues. |
Beta Was this translation helpful? Give feedback.
-
I personally also did not succeed in writing it from the first try, due to need of figuring out how to correctly re-implement Batch interface. However, after I've done it, I have not yet come back to modify it - it works fine so far so it's mostly 'write once and forget' approach. You can also just stub some methods and do nothing in them, as I did for example with DrawText3D because I didn't have text rendering at that time, and needed mostly just visual drawings of the bodies and their shapes, rather than textual info. IMHO, changing current debug renderer interface would be a quite breaking change, so it's either better to add an additional "simplified" renderer so you can switch between them when needed, or just have ready-to-use implementations of renderers for different backends and libraries like SDL/OpenGL/Vulkan that you can copy-paste into your project with minimal changes. |
Beta Was this translation helpful? Give feedback.
-
I just added DebugRendererSimple |
Beta Was this translation helpful? Give feedback.
-
I implemented the debug renderer in |
Beta Was this translation helpful? Give feedback.
-
Hello.
I'm currently a bit struggling to implement my own debug renderer because it's quite complex. I understand that this is needed to implement an efficient renderer, but what if there was a simpler wireframe renderer which could be implemented in more of an "immediate mode" style?
For example, implementing debug renderer for Bullet was much easier (see docs here) - you only need to implement three methods:
drawLine
,drawContactPoint
,reportErrorWarning
anddraw3dText
.To get basic wireframe rendering working, you only need to implement
drawLine(from, to, color)
- and this is already enough to at least see the outlines/wireframes of the bodies in your physics scene - which can be enough for a start.What do you think? I think that this might be a pretty handy feature for people who want to quickly jump in, add some bodies into the scene and see that they're at correct positions, orientations etc.
Beta Was this translation helpful? Give feedback.
All reactions