protected override void DestroyAssets() { DestroyBuffers(); DestroyInputLayout(); void DestroyInputLayout() { var inputLayout = _inputLayout; if (inputLayout != null) { _inputLayout = null; _ = inputLayout->Release(); } var pixelShader = _pixelShader; if (pixelShader != null) { _pixelShader = null; _ = pixelShader->Release(); } var vertexShader = _vertexShader; if (vertexShader != null) { _vertexShader = null; _ = vertexShader->Release(); } } }
public void PSSetShader([NativeTypeName("ID3D11PixelShader *")] ID3D11PixelShader *pPixelShader, [NativeTypeName("ID3D11ClassInstance *const *")] ID3D11ClassInstance **ppClassInstances, [NativeTypeName("UINT")] uint NumClassInstances) { ((delegate * stdcall <ID3D11DeviceContext *, ID3D11PixelShader *, ID3D11ClassInstance **, uint, void>)(lpVtbl[9]))((ID3D11DeviceContext *)Unsafe.AsPointer(ref this), pPixelShader, ppClassInstances, NumClassInstances); }
protected override void Dispose(bool isDisposing) { var vertexBuffer = _vertexBuffer; if (vertexBuffer != null) { _vertexBuffer = null; _ = vertexBuffer->Release(); } var inputLayout = _inputLayout; if (inputLayout != null) { _inputLayout = null; _ = inputLayout->Release(); } var pixelShader = _pixelShader; if (pixelShader != null) { _pixelShader = null; _ = pixelShader->Release(); } var vertexShader = _vertexShader; if (vertexShader != null) { _vertexShader = null; _ = vertexShader->Release(); } var swapChain = _swapChain; if (swapChain != null) { _swapChain = null; _ = swapChain->Release(); } var immediateContext = _immediateContext; if (immediateContext != null) { _immediateContext = null; _ = immediateContext->Release(); } var device = _device; if (device != null) { _device = null; _ = device->Release(); } var renderTarget = _renderTarget; if (renderTarget != null) { _renderTarget = null; _ = renderTarget->Release(); } base.Dispose(isDisposing); }