Example #1
0
        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);
        }
Example #2
0
        internal void VisitRenderQueue()
        {
            IsRendering = true;
            quads.Clear();

            while (RenderQueue.HasItems)
            {
                var command = RenderQueue.Dequeue();
                ExecuteRenderCommand(command);
            }

            Flush();

            IsRendering = false;
        }
Example #3
0
        public void AddComand(CCRenderCommand command)
        {
            var renderQueueId = new CCRenderQueueId(Group, 0, (int)command.Depth, command.MaterialId);

            RenderQueue.Enqueue(renderQueueId, command);
        }