protected override void Destroy() { DestroyPlatformDevice(); // Notify listeners if (Disposing != null) { Disposing(this, EventArgs.Empty); } SamplerStates.Dispose(); BlendStates.Dispose(); RasterizerStates.Dispose(); DepthStencilStates.Dispose(); if (DepthStencilBuffer != null) { DepthStencilBuffer.Dispose(); } primitiveQuad.Dispose(); SamplerStates = null; BlendStates = null; RasterizerStates = null; DepthStencilStates = null; base.Destroy(); }
protected override void ResizeDepthStencilBuffer(int width, int height, PixelFormat format) { var newTextureDescrition = DepthStencilBuffer.Description; newTextureDescrition.Width = width; newTextureDescrition.Height = height; // Manually update the texture DepthStencilBuffer.OnDestroyed(); // Put it in our back buffer texture DepthStencilBuffer.InitializeFrom(newTextureDescrition); }
protected override void ResizeDepthStencilBuffer(int width, int height, PixelFormat format) { var newTextureDescrition = DepthStencilBuffer.Description; newTextureDescrition.Width = width; newTextureDescrition.Height = height; // Manually update the texture DepthStencilBuffer.OnDestroyed(); // Manually update all children textures var fastList = DestroyChildrenTextures(DepthStencilBuffer); // Put it in our back buffer texture DepthStencilBuffer.InitializeFrom(newTextureDescrition); foreach (var texture in fastList) { texture.InitializeFrom(DepthStencilBuffer, texture.ViewDescription); } }
/// <summary> /// Sets a new depth stencil buffer and multiple render targets to this GraphicsDevice. /// </summary> /// <param name="depthStencilBuffer">The depth stencil buffer.</param> /// <param name="renderTargets">The render targets.</param> public void SetDepthAndRenderTargets(DepthStencilBuffer depthStencilBuffer, params RenderTarget[] renderTargets) { throw new NotImplementedException(); }
/// <summary> /// Clears a depth stencil buffer. /// </summary> /// <param name="depthStencilBuffer">The depth stencil buffer.</param> /// <param name="options">Options for clearing a buffer.</param> /// <param name="depth">Set this depth value for the Depth buffer.</param> /// <param name="stencil">Set this stencil value for the Stencil buffer.</param> public void Clear(DepthStencilBuffer depthStencilBuffer, DepthStencilClearOptions options, float depth = 1, byte stencil = 0) { throw new NotImplementedException(); }