Page 1 of 1

Way to integrate a graphics engine

Posted: Thu Jul 16, 2015 1:42 pm
by newHere
Hello, I need a good quality code to integrate your engine with a graphics engine.
What I need is a array of vertices ready to draw or to be transformed and the type of the shape.
However I can't figure out the way to get this data from cpShape or cpBody. I wish not to store any extra vertices just for rendering and it would be nice not to have to transform/calculate anything just for rendering. Why aren't the physics engines provide simple way to access such needed data? I was using box2d before and had figured out the way to draw them but wasn't happy with the code quality. Chipmunk2d seems to have better api for me as a beginner so I decided to give it a try. I know it could be possible to use the private/unsafe api of chipmunk but I would like not to.