Hi,
I am attempting to render the HelloWorld Demo using OpenGL. The HelloWorld demo as included with the Bullet download prints to standard output. There are other demos that use OpenGL and Glut to render, but I'm having trouble understanding how it works... hopefully implementing it myself will fix that.
Here's my problem: I don't know how to get the vertices of a btCollisionShape (or a btRigidBody). I can get the world transform from the motion state, in fact this code exists in the HelloWorld Demo. But don't I have to apply the transformation to a set of vertices/triangles and then send them to OpenGL for rendering?
In case it matters, I'm using OpenGL 3.3+. I'm also using GLFW instead of Glut, but I can't see how that would be important, I'm just using it to create a rendering surface right now.
Thanks in advance for any advice!
Brian
Get vertices from a btCollisionObject for OpenGL rendering.
-
- Posts: 1
- Joined: Tue Jan 22, 2013 2:11 pm
-
- Posts: 149
- Joined: Fri Jun 24, 2011 8:53 am
Re: Get vertices from a btCollisionObject for OpenGL renderi
Maybe taking a look at btIDebugDraw will help you.
Quick truth: some shapes have no vertices at all. Those which have (such as the convex hull) might not be in the correct order to render.
Quick truth: some shapes have no vertices at all. Those which have (such as the convex hull) might not be in the correct order to render.