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; }
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); }