After all draw calls have been collected for this blend mode and shader they all drawn here.
View code on GitHub Namespace: DeltaEngine.GraphicsAssembly: DeltaEngine.Graphics (in DeltaEngine.Graphics.dll) Version: 1.1.1.0 (1.1.1)
public virtual void DrawAllTextureChunks()
public virtual void DrawAllTextureChunks()
Public Overridable Sub DrawAllTextureChunks
Public Overridable Sub DrawAllTextureChunks
public:
virtual void DrawAllTextureChunks()
public:
virtual void DrawAllTextureChunks()
abstract DrawAllTextureChunks : unit -> unit
override DrawAllTextureChunks : unit -> unit
abstract DrawAllTextureChunks : unit -> unit
override DrawAllTextureChunks : unit -> unit
Tests:
DeltaEngine.Graphics.Tests.CircularBufferTests1 unit tests call DeltaEngine.Graphics.CircularBuffer.DrawAllTextureChunks
[Test, CloseAfterFirstFrame]
public void DrawAndReset()
{
const int VerticesCount = 32;
const int IndicesCount = 48;
var vertices = new VertexPosition2DUV[VerticesCount];
var indices = new short[IndicesCount];
buffer2D.Add(null, vertices, indices);
Assert.IsFalse(buffer2D.HasDrawn);
buffer2D.DrawAllTextureChunks();
Assert.IsTrue(buffer2D.HasDrawn);
Assert.AreEqual(512, buffer2D.VertexOffset);
Assert.AreEqual(96, buffer2D.IndexOffset);
}
[Test, CloseAfterFirstFrame]
public void DrawAndReset()
{
const int VerticesCount = 32;
const int IndicesCount = 48;
var vertices = new VertexPosition2DUV[VerticesCount];
var indices = new short[IndicesCount];
buffer2D.Add(null, vertices, indices);
Assert.IsFalse(buffer2D.HasDrawn);
buffer2D.DrawAllTextureChunks();
Assert.IsTrue(buffer2D.HasDrawn);
Assert.AreEqual(512, buffer2D.VertexOffset);
Assert.AreEqual(96, buffer2D.IndexOffset);
}