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

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

            Flush();

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

            RenderQueue.Enqueue(renderQueueId, command);
        }