CircularBufferTests IndicesAreRemappedWhenAddedVerticesAreNotAtTheBeginningOfTheBuffer Method Delta Engine Documentation

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

public void IndicesAreRemappedWhenAddedVerticesAreNotAtTheBeginningOfTheBuffer()
Examples

[Test, CloseAfterFirstFrame]
public void IndicesAreRemappedWhenAddedVerticesAreNotAtTheBeginningOfTheBuffer()
{
    var remappedIndices = new short[] { 4, 5, 6, 4, 6, 7 };
    var vertices = new VertexPosition2DUV[4];
    buffer2D.Add(image, vertices, quadIndices);
    Assert.AreEqual(quadIndices, buffer2D.CachedIndices);
    buffer2D.Add(image, vertices, quadIndices);
    Assert.AreEqual(remappedIndices, buffer2D.CachedIndices);
}
See Also