[Resolved] Using BEPU with DrawUserIndexedPrimitives()
Posted: Mon Dec 12, 2011 11:30 pm
I'm working to adapt your 'getting started' demo.
I notice that in nearly all cases you load XNA Model files through the pipeline. At points in my program I am needing to render convex hulls with a shader. Since my methods only generate true vertex convex hulls, my plan was to use your GetShapeMeshData() method to get the vertices and indices for rendering and then run the shader pass, and then render the geometry using the DrawUserIndexedPrimitives. However it seems like this would take a slightly different approach to the one taken in the demo since I don't have a mesh to have any effects to use with the object world matrix. I just have these verts and indices which I need to transform to match the physics engine values in the world. I tried transforming each point by the object world matrix but this just gave weird results.
I notice that in nearly all cases you load XNA Model files through the pipeline. At points in my program I am needing to render convex hulls with a shader. Since my methods only generate true vertex convex hulls, my plan was to use your GetShapeMeshData() method to get the vertices and indices for rendering and then run the shader pass, and then render the geometry using the DrawUserIndexedPrimitives. However it seems like this would take a slightly different approach to the one taken in the demo since I don't have a mesh to have any effects to use with the object world matrix. I just have these verts and indices which I need to transform to match the physics engine values in the world. I tried transforming each point by the object world matrix but this just gave weird results.