public static void DrawIndexedPrimitives(this GraphicsDevice GraphicsDevice, VertexBuffer vb, IndexBuffer ib, VertexDeclaration decl) { GraphicsDevice.SetVertexBuffer(vb, decl, ib); GraphicsDevice.DrawIndexedPrimitives(vb.GetVertexBufferCount(), ib.GetIndexBufferPrimitiveCount()); }