Jump to content
  • Advertisement
Owen1520

Vulkan Bullet physics debug draw using Vulkan?

Recommended Posts

Hey, I recently started moving my engine over to Vulkan. Everything's going smoothly, but I'm having some trouble figuring out how to get debug drawing for Bullet to work. Would I have to call

vkCmdDraw()

every time the

drawLine()

function in Bullet's debug class is called? That seems like it wouldn't be very good for performance. Any tips? Thanks!

Share this post


Link to post
Share on other sites
Advertisement

It's common to write an "immediate mode" style rendering API on top of your actual graphics API, for use by debug drawing systems, UI, etc... Every time you want to draw something small, like a line, you can write a few vertices into a large, dynamic vertex buffer. When all the line drawing commands have been submitted, you've got a buffer full of many lines, which you can then draw with a single vk/gl/d3d draw call.

Share this post


Link to post
Share on other sites

So basically I would allocate a vertex buffer with a large size, and update it with new vertex data each time the drawLine function is called?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!