public static void DrawAllPasses(this EffectTechnique tech, DeviceContext context, int indexCount) { for (var i = 0; i < tech.Description.PassCount; i++) { tech.GetPassByIndex(i).Apply(context); context.DrawIndexed(indexCount, 0, 0); } }