コード例 #1
0
        public void Reset(CommandList commandList)
        {
            this.commandList = commandList;

            foreach (var descriptorPool in descriptorPools)
            {
                descriptorPool.Reset();
            }

            foreach (var bufferPool in bufferPools)
            {
                bufferPool.Reset();
            }

            currentResourceGroupPoolIndex = -1;

            currentDescriptorPool = descriptorPools[0];
            currentDescriptorPoolIndex = 0;

            currentBufferPool = null;
            currentBufferPoolIndex = -1;
        }
コード例 #2
0
        private void SetupNextBufferPool()
        {
            Flush();

            currentBufferPoolIndex++;
            if (currentBufferPoolIndex >= bufferPools.Count)
            {
                bufferPools.Add(currentBufferPool = BufferPool.New(allocator, graphicsDevice, 1024*1024));
            }
            else
            {
                currentBufferPool = bufferPools[currentBufferPoolIndex];
            }

            currentBufferPool.Map(commandList);
        }