Code, based on BEPU demos code:
Code: Select all
// inside LoadContent
this.space = new BEPUphysics.Space();
this.md = new BEPUphysicsDrawer.Models.InstancedModelDrawer(this);
this.space.Add(new BEPUphysics.Entities.Prefabs.Box(new BEPUutilities.Vector3(0, 0, 0), 2, 2, 2));
this.space.Add(new BEPUphysics.Entities.Prefabs.Sphere(new BEPUutilities.Vector3(0, 3, 0), 2));
foreach (BEPUphysics.Entities.Entity e in this.space.Entities)
{
this.md.Add(e);
}
// inside Update
this.space.Update();
this.md.Update();
// inside Draw
BEPUutilities.Matrix view2 = BEPUutilities.Matrix.CreatePerspectiveFieldOfViewRH(MathHelper.PiOver4, this.GraphicsDevice.Viewport.AspectRatio, 1, 100);
BEPUutilities.Matrix proj2 = BEPUutilities.Matrix.CreateLookAtRH(new BEPUutilities.Vector3(0,0,3), BEPUutilities.Vector3.Zero, BEPUutilities.Vector3.Up);
this.md.Draw(view2, proj2);
Weird thing - I can't see effect file source in PIX, other custom shaders are working fine.
To the Content project I've added everything that Demos Content has.
System, gpu drivers are all up-to-date... am I missing something?