Original Post
In order to perform instancing of Direct3D Meshes the way I want to, I'd like to replace the DrawSubset method with my custom implementation. I have looked through the forums and saw a couple of implementations which are very similar to what I have. Unfortunately, when I render my scene with this replacement implementation, none of the meshes are visible. I ran NVPerfHUD on the application and all of the draw calls are still being made (evidenced also by an identical framerate for either implementation). Does anyone have any idea why my custom implementation would result in nothing being rendered? My implementation: Any ideas are appreciated.
AttributeRange attribRange = mesh.GetAttributeTable()[id];
device.VertexFormat = mesh.VertexFormat;
device.SetStreamSource(0, mesh.VertexBuffer, 0);
device.Indices = mesh.IndexBuffer;
device.DrawIndexedPrimitives(
PrimitiveType.TriangleList,
0,
attribRange.VertexStart,
attribRange.VertexCount,
3 * attribRange.FaceStart,
attribRange.FaceCount);