CircularBufferTests DataBiggerThanBufferSize 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 DataBiggerThanBufferSize()
Examples

[Test, CloseAfterFirstFrame]
public void DataBiggerThanBufferSize()
{
    var verticesCount = buffer2D.MaxNumberOfVertices * 3;
    var indicesCount = buffer2D.MaxNumberOfVertices * 4;
    var vertices = new VertexPosition2DUV[verticesCount];
    var indices = new short[indicesCount];
    buffer2D.Add(null, vertices, indices);
    Assert.AreEqual(verticesCount * vertexSize, buffer2D.VertexOffset);
    Assert.AreEqual(indicesCount * sizeof(short), buffer2D.IndexOffset);
}
See Also