From 80ebf23a5ded0ee1d58c5b44a00595f85b615ffe Mon Sep 17 00:00:00 2001 From: dorbie Date: Thu, 1 Feb 2018 14:06:35 -0800 Subject: [PATCH] Write depth buffer & view to registered RenderBuffer depthStencilTextures and depthStencilViews vectors seem to be deprecated but leave for now --- examples/SpinCubeD3D.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/SpinCubeD3D.cpp b/examples/SpinCubeD3D.cpp index 58ed200..cbaf820 100644 --- a/examples/SpinCubeD3D.cpp +++ b/examples/SpinCubeD3D.cpp @@ -280,9 +280,6 @@ int main(int argc, char* argv[]) { new osvr::renderkit::RenderBufferD3D11; rbD3D->colorBuffer = D3DTexture; rbD3D->colorBufferView = renderTargetView; - osvr::renderkit::RenderBuffer rb; - rb.D3D11 = rbD3D; - renderBuffers.push_back(rb); //================================================================== // Create a depth buffer @@ -328,6 +325,12 @@ int main(int argc, char* argv[]) { return -5; } depthStencilViews.push_back(depthStencilView); + + rbD3D->depthStencilBuffer = depthStencilBuffer; + rbD3D->depthStencilView = depthStencilView; + osvr::renderkit::RenderBuffer rb; + rb.D3D11 = rbD3D; + renderBuffers.push_back(rb); } // Create depth stencil state.