private EffectPool(GraphicsDevice device, string name = null) : base(name) { dataGroup = new EffectData(); mapNameToEffect = new Dictionary<string, EffectData.Effect>(); mapNameToConstantBuffer = new Dictionary<GraphicsDevice, Dictionary<string, Dictionary<EffectConstantBufferKey, EffectConstantBuffer>>>(); compiledShaders = new List<DeviceChild>(); registered = new Dictionary<EffectData, bool>(new IdentityEqualityComparer<EffectData>()); effects = new List<Effect>(); this.graphicsDevice = device.MainDevice; constantBufferAllocator = DefaultConstantBufferAllocator; }
private EffectPool(GraphicsDevice device, string name = null) : base(name) { RegisteredShaders = new List <EffectData.Shader>(); mapNameToConstantBuffer = new Dictionary <GraphicsDevice, Dictionary <string, Dictionary <EffectConstantBufferKey, EffectConstantBuffer> > >(); compiledShadersGroup = new List <DeviceChild> [(int)EffectShaderType.Compute + 1]; for (int i = 0; i < compiledShadersGroup.Length; i++) { compiledShadersGroup[i] = new List <DeviceChild>(256); } registered = new Dictionary <EffectData, EffectData.Effect>(new IdentityEqualityComparer <EffectData>()); effects = new List <Effect>(); RegisteredEffects = new ReadOnlyCollection <Effect>(effects); this.graphicsDevice = device.MainDevice; constantBufferAllocator = DefaultConstantBufferAllocator; graphicsDevice.EffectPools.Add(this); }
private EffectPool(GraphicsDevice device, string name = null) : base(name) { RegisteredShaders = new List<EffectData.Shader>(); mapNameToConstantBuffer = new Dictionary<GraphicsDevice, Dictionary<string, Dictionary<EffectConstantBufferKey, EffectConstantBuffer>>>(); compiledShadersGroup = new List<DeviceChild>[(int)EffectShaderType.Compute + 1]; for (int i = 0; i < compiledShadersGroup.Length; i++) { compiledShadersGroup[i] = new List<DeviceChild>(256); } registered = new Dictionary<EffectData, EffectData.Effect>(new IdentityEqualityComparer<EffectData>()); effects = new List<Effect>(); RegisteredEffects = new ReadOnlyCollection<Effect>(effects); this.graphicsDevice = device.MainDevice; constantBufferAllocator = DefaultConstantBufferAllocator; graphicsDevice.EffectPools.Add(this); }