private void ShuddownShader() { // Release the light constant buffer. if (ConstantLightBuffer != null) { ConstantLightBuffer.Dispose(); ConstantLightBuffer = null; } // Release the matrix constant buffer. if (ConstantCameraBuffer != null) { ConstantCameraBuffer.Dispose(); ConstantCameraBuffer = null; } // Release the matrix constant buffer. if (ConstantMatrixBuffer != null) { ConstantMatrixBuffer.Dispose(); ConstantMatrixBuffer = null; } // Release the sampler state. if (SampleState != null) { SampleState.Dispose(); SampleState = null; } // Release the layout. if (Layout != null) { Layout.Dispose(); Layout = null; } // Release the pixel shader. if (PixelShader != null) { PixelShader.Dispose(); PixelShader = null; } // Release the vertex shader. if (VertexShader != null) { VertexShader.Dispose(); VertexShader = null; } }
public override void Shutdown() { ConstantLightBuffer?.Dispose(); ConstantLightBuffer = null; ConstantCameraBuffer?.Dispose(); ConstantCameraBuffer = null; ConstantMatrixBuffer?.Dispose(); ConstantMatrixBuffer = null; ConstantShaderParamBuffer?.Dispose(); ConstantShaderParamBuffer = null; SamplerState?.Dispose(); SamplerState = null; Layout?.Dispose(); Layout = null; PixelShader?.Dispose(); PixelShader = null; VertexShader?.Dispose(); VertexShader = null; }
public virtual void Shutdown() { ConstantLightBuffer?.Dispose(); ConstantLightBuffer = null; ConstantCameraBuffer?.Dispose(); ConstantCameraBuffer = null; ConstantMatrixBuffer?.Dispose(); ConstantMatrixBuffer = null; ConstantEditorParamsBuffer?.Dispose(); ConstantEditorParamsBuffer = null; SamplerState?.Dispose(); SamplerState = null; Layout?.Dispose(); Layout = null; PixelShader?.Dispose(); PixelShader = null; VertexShader?.Dispose(); VertexShader = null; }
private void ShuddownShader() { // Release the sampler state. SamplerState?.Dispose(); SamplerState = null; // Release the camera constant buffer. ConstantCameraBuffer?.Dispose(); ConstantCameraBuffer = null; // Release the light constant buffer. ConstantLightBuffer?.Dispose(); ConstantLightBuffer = null; // Release the matrix constant buffer. ConstantMatrixBuffer?.Dispose(); ConstantMatrixBuffer = null; // Release the layout. Layout?.Dispose(); Layout = null; // Release the pixel shader. PixelShader?.Dispose(); PixelShader = null; // Release the vertex shader. VertexShader?.Dispose(); VertexShader = null; }