/// <summary> /// Release Elements /// </summary> public void Dispose() { if (VertexShader != null) { VertexShader.Dispose(); } if (PixelShader != null) { PixelShader.Dispose(); } if (GeometryShader != null) { GeometryShader.Dispose(); } if (DomainShader != null) { DomainShader.Dispose(); } if (HullShader != null) { HullShader.Dispose(); } if (Layout != null) { Layout.Dispose(); } }
public override void Dispose() { base.Dispose(); Utilities.Dispose(ref _cb); _tri.Dispose(); _quad.Dispose(); _HShader.Dispose(); _DShader.Dispose(); _GShader.Dispose(); }
private void ShuddownShader() { // Release the tessellation constant buffer. ConstantTessellationBuffer?.Dispose(); ConstantTessellationBuffer = null; // Release the matrix constant buffer. ConstantMatrixBuffer?.Dispose(); ConstantMatrixBuffer = null; // Release the layout. Layout?.Dispose(); Layout = null; // Release the Vertex shader. VertexShader?.Dispose(); VertexShader = null; // Release the Hull shader. PixelShader?.Dispose(); PixelShader = null; // Release the Domain shader. HullShader?.Dispose(); HullShader = null; // Release the Pixel shader. DomainShader?.Dispose(); DomainShader = null; }