Skip to content

Some Issues Implementing the Debug Renderer #964

Answered by jrouwe
cuppajoeman asked this question in Q&A
Discussion options

You must be logged in to vote

I think the biggest problem is that you're storing a pointer to the triangle data that you get passed in:

https://github.com/opengl-toolbox/mwe_physics_world_with_character/blob/c25f6898390d7b48daef7b87b87c6722442a21c8/graphics/physics_debug_renderer/physics_debug_renderer.hpp#L63-L68

however that data is destructed the moment CreateTriangleBatch returns. You need to create a copy.

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@cuppajoeman
Comment options

Answer selected by cuppajoeman
Comment options

You must be logged in to vote
3 replies
@cuppajoeman
Comment options

@jrouwe
Comment options

@cuppajoeman
Comment options

Comment options

You must be logged in to vote
2 replies
@jrouwe
Comment options

@cuppajoeman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants