Пример #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StatePoolManager"/> class.
 /// </summary>
 /// <param name="device">The device.</param>
 public StatePoolManager(Device device)
 {
     BlendStatePool        = new BlendStatePool(device);
     RasterStatePool       = new RasterStatePool(device);
     DepthStencilStatePool = new DepthStencilStatePool(device);
     SamplerStatePool      = new SamplerStatePool(device);
 }
Пример #2
0
 protected override void OnDispose(bool disposeManagedResources)
 {
     BlendStatePool.Dispose();
     RasterStatePool.Dispose();
     DepthStencilStatePool.Dispose();
     SamplerStatePool.Dispose();
     base.OnDispose(disposeManagedResources);
 }
Пример #3
0
 /// <summary>
 /// Registers the specified desc.
 /// </summary>
 /// <param name="desc">The desc.</param>
 /// <returns></returns>
 public RasterizerStateProxy Register(RasterizerStateDescription desc)
 {
     return(RasterStatePool.Register(desc) as RasterizerStateProxy);
 }
Пример #4
0
 /// <summary>
 /// Registers the specified desc.
 /// </summary>
 /// <param name="desc">The desc.</param>
 /// <returns></returns>
 public RasterizerStateProxy Register(RasterizerStateDescription desc)
 {
     return(RasterStatePool.TryCreateOrGet(desc, desc, out var state) ? state : null);
 }