amerkoleci / JoltPhysicsSharp

JoltPhysics C# bindings
MIT License
217 stars 34 forks source link

Debug Renderer #89

Open galvesribeiro opened 1 week ago

galvesribeiro commented 1 week ago

Hello!

Is there bindings for the Debug Renderer from Jolt?

If yes, can you point me where is it as I couldn't find the types and overloads for it.

Thank you!

amerkoleci commented 1 week ago

Hello, Not at the moment but on the roadmap, feel free to submit PR.

Thanks!

galvesribeiro commented 1 week ago

Cool. Are the types exposed on the C API or does it require a PR there as well?

amerkoleci commented 1 week ago

They are not exposed on the C API layer

amerkoleci commented 1 week ago

Debug Renderer (WIP) just landed in joltc, https://github.com/amerkoleci/joltc/commit/0ab6b36f430194338514d5d6869dd64e9ebdd096 will add C# stuff soon.

amerkoleci commented 1 week ago

Debug Renderer just landed in commit https://github.com/amerkoleci/JoltPhysicsSharp/commit/6236bfc04cd2fca30b1d4e40ab6d55727672d688: Version 2.9.1 contains all this goodies.

Cheers

galvesribeiro commented 1 week ago

OMG! Thank you! I'll give it a try :D

galvesribeiro commented 1 week ago

I had a Quick Look here on the DebugRenderer abstract class and overwrite the methods trying to understand/compare with the native examples and I got a few questions:

We are using Jolt on the server side. So my goal is to achieve something like PVD on PhysX. We'll create a tool which is listening on a given port like PVD. Then, the server at startup will connect to it. Every call on our DebugRenderer implementation methods, would essentially batch that command into some sort of queue. Then, when a frame is completed, we send the frame commands to the tool over that connection and will start a new batch for the next frame.

I don't see any way we are signaled that a frame was completed on the current DebugRenderer API since we don't have the CreateTriangleBatch. Do you think the best moment to send those batched commands to the tool after the call to PhysicsSystem.Update()?

Again, thanks for our efforts and for quick reply! This DebugRenderer support is very important for using this library.