internal CCRenderer(CCDrawManager drawManager) { DrawManager = drawManager; RenderQueue = new RenderQueue <CCRenderQueueId, CCRenderCommand>(); quads = new CCRawList <CCV3F_C4B_T2F_Quad>(); batchCommands = new List <CCRenderCommand>(BATCH_QUADCOMMAND_RESEVER_SIZE); batchQuadCommands = new List <CCQuadCommand>(BATCH_QUADCOMMAND_RESEVER_SIZE); }
internal void VisitRenderQueue() { IsRendering = true; quads.Clear(); while (RenderQueue.HasItems) { var command = RenderQueue.Dequeue(); ExecuteRenderCommand(command); } Flush(); IsRendering = false; }
public void AddComand(CCRenderCommand command) { var renderQueueId = new CCRenderQueueId(Group, 0, (int)command.Depth, command.MaterialId); RenderQueue.Enqueue(renderQueueId, command); }