SpriteTests DrawingTwoSpritesWithTheSameImageAndRenderLayerOnlyIssuesOneDrawCall Method Delta Engine Documentation

Namespace: DeltaEngine.Rendering2D.Tests
Assembly: DeltaEngine.Rendering2D.Tests (in DeltaEngine.Rendering2D.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void DrawingTwoSpritesWithTheSameImageAndRenderLayerOnlyIssuesOneDrawCall()
Examples

[Test, CloseAfterFirstFrame]
public void DrawingTwoSpritesWithTheSameImageAndRenderLayerOnlyIssuesOneDrawCall()
{
    new Sprite(logoMaterial, Rectangle.HalfCentered);
    new Sprite(logoMaterial, Rectangle.HalfCentered);
    RunAfterFirstFrame(
        () => Assert.AreEqual(1, Resolve<Drawing>().NumberOfDynamicDrawCallsThisFrame));
}
See Also