How to apply Bullet physics to drawn Opengl 3d shapes

后端 未结 4 1684
情话喂你
情话喂你 2020-12-30 13:55

I was just wondering whether there is a way to apply bullet physics to opengl drawn objects (created using glVertex3f or triangle mesh with glVertexAttribPointer). I am curr

4条回答
  •  既然无缘
    2020-12-30 14:41

    Bullet is independent of OpenGL, it's up to you to apply the transformation to your geometry.

    You can store your transforms into separate objects instead of modifying your vertices. It's what do Vehicle Dynamics Engine Demo (JOGL + JBullet) and JMonkeyEngine 3 which has its own Bullet binding and a renderer based on JOGL 2 (and some other renderers that I don't use).

    Please look at our demos using JOGL and JBullet here: https://github.com/sgothel/jogl-demos/tree/master/src/jbullet

提交回复
热议问题