コード例 #1
0
        private void RecreateDepthTexture(uint width, uint height)
        {
            Debug.Assert(_depthFormat.HasValue);
            if (_depthTexture != null)
            {
                _depthTexture.Dispose();
            }

            _depthTexture = Util.AssertSubtype <Texture, MTLTexture>(
                _gd.ResourceFactory.CreateTexture(TextureDescription.Texture2D(
                                                      width, height, 1, 1, _depthFormat.Value, TextureUsage.DepthStencil)));
        }
コード例 #2
0
 public override void Dispose()
 {
     _depthTexture?.Dispose();
 }
コード例 #3
0
 public override void Dispose()
 {
     _depthTexture?.Dispose();
     _disposed = true;
 }