After stopping playing with BEPUphysics for a while I'm looking to continue some of my old projects. I'm running into some problems getting things to work on my new machine. The problem is that XNA isn't supported anymore, which means I have to use VS 2010 to be able to get the demos running. The problem with this is that I have windows 10 on my machine and it seems that it doesn't support VS 2010. Rather then going through the trouble of trying to find a download for it (which is hard enough) and then trying to get it to work on my machine (which doesn't seem to be that easy either form what I've read online) I decided to port the demos to monogame instead.
I've started by adding to code for the BEPUphysicsDrawer to a new class library project, using a reference to the monogame dll, and this seems to be working fine for the most part. There are two errors though, both of which occur in the ModelDisplayObjectBatch class. I'm using the source code of commit 7bd277b2f999.
The first error is that the textureIndicesParameter.SetValue call in line 222 of the Draw method doesn't accept int[] as an argument. This seems to be an oversight on the part of the monogame developers, since the SetValue method has overloads to accept arrays of every other values it can accept singletons from. Would there be any way to work around this problem? (The error occurs twice on line 116, and twice on line 195.)
The second error is the conversion from VertexBuffer to VertexBufferBinding. It seems this conversion should be implicit, but I get this error:
Code: Select all
Error CS0029 Cannot implicitly convert type 'Microsoft.Xna.Framework.Graphics.VertexBuffer' to 'Microsoft.Xna.Framework.Graphics.VertexBufferBinding'