protected override void Destroy() { for (int i = 0; i < VertexBufferCount; i++) { vertexBuffers[i].Dispose(); } activeVertexBufferIndex = -1; mappedVertexBufferPointer = IntPtr.Zero; if (indexBuffer != null) { indexBuffer.Dispose(); indexBuffer = null; } indexBufferBinding = null; pipelineState = null; if (simpleEffect != null) { simpleEffect.Dispose(); simpleEffect = null; } for (int i = 0; i < VertexBufferCount; i++) { inputElementDescriptions[i] = null; } charsToRenderCount = -1; base.Destroy(); }
public override void Cancel() { streamOutBufferBinding.Buffer.Dispose(); transformBuffer.Dispose(); colorBuffer.Dispose(); streamShader.Dispose(); }
public void Dispose() { if (_isDisposed) { return; } EffectInstance.Dispose(); Effect.Dispose(); _isDisposed = true; }
void IDisposable.Dispose() { effectInstance?.Dispose(); effectInstance = null; if (linesBuffer != indexLinesBuffer && linesBuffer != indexPointsBuffer) { linesBuffer?.Dispose(); } linesBuffer = null; linesCount = 0; triangleBuffer?.Dispose(); triangleBuffer = null; triangleCount = 0; vertexFormat?.Dispose(); vertexFormat = null; vertexBuffer?.Dispose(); vertexBuffer = null; vertexCount = 0; }
/// <summary> /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. /// </summary> public override void Dispose() { if (VertexBuffer != null && !VertexBuffer.IsDisposed) { VertexBuffer.Dispose(); } if (effect != null && !effect.IsDisposed) { effect.Dispose(); } }
public void Dispose() { DeallocateTextureViewsForMipMaps(); renderTargetMipMaps = null; effectDecoderTextureCopy?.Dispose(); effectDecoderTextureCopy = null; effectTexture2DCopy?.Dispose(); effectTexture2DCopy = null; renderTargetTexture?.Dispose(); renderTargetTexture = null; minMagLinearMipPointSampler?.Dispose(); minMagLinearMipPointSampler = null; }