public TextOutput ( TextVertexBuffer textBuffer, DrawElementsIndirectCommand[] drawCommands, SentanceBlockStorageBuffer storage) { TextBuffer = textBuffer; DrawCommands = drawCommands; Storage = storage; Stride = System.Runtime.InteropServices.Marshal.SizeOf (typeof(DrawElementsIndirectCommand)); }
void AddDrawCommand (IList<uint> indicesChunk, uint firstIndex, uint baseVertex, uint currentBlock) { var command = new DrawElementsIndirectCommand (); command.Count = (uint)indicesChunk.Count; command.InstanceCount = 1; command.FirstIndex = firstIndex; command.BaseVertex = baseVertex; // IMPORTANT - controls material index command.BaseInstance = currentBlock; mDrawCommands.Add (command); }