Namespace: DeltaEngine.Graphics.Tests
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Examples
[Test, CloseAfterFirstFrame] public void LoadDataWithDifferentSize() { const int Data1VerticesCount = 100; const int Data1IndicesCount = 150; const int Data2VerticesCount = 400; const int Data2IndicesCount = 500; var vertices1 = new VertexPosition2DUV[Data1VerticesCount]; var indices1 = new short[Data1IndicesCount]; var vertices2 = new VertexPosition2DUV[Data2VerticesCount]; var indices2 = new short[Data2IndicesCount]; buffer2D.Add(null, vertices1, indices1); Assert.AreEqual(Data1VerticesCount * vertexSize, buffer2D.VertexOffset); Assert.AreEqual(Data1IndicesCount * sizeof(short), buffer2D.IndexOffset); buffer2D.Add(null, vertices2, indices2); Assert.AreEqual((Data1VerticesCount + Data2VerticesCount) * vertexSize, buffer2D.VertexOffset); Assert.AreEqual((Data1IndicesCount + Data2IndicesCount) * sizeof(short), buffer2D.IndexOffset); }
See Also