I am trying to implement a stereoscopic 3D application. To start, I am porting the related MSDN stereoscopic 3D sample.
I was able to activate the emitter and actually see something in 3D. However I am not able to create the D2D BitmapTargets. It crashes on this line:
using (var dxgiBackBuffer = swapChain.GetBackBuffer<SharpDX.DXGI.Surface>(0))
It seems that in a S3D app, that will not work. In the actual sample they are calling:
// Direct2D needs the dxgi version of the backbuffer surface pointer. ComPtr<IDXGIResource1> dxgiBackBuffer; DX::ThrowIfFailed( m_swapChain->GetBuffer(0, IID_PPV_ARGS(&dxgiBackBuffer)) ); ComPtr<IDXGISurface2> dxgiSurface; DX::ThrowIfFailed( dxgiBackBuffer->CreateSubresourceSurface(0, &dxgiSurface) ); // then they create the two bitmap targets
However in SharpDX it seems that the method CreateSubresourceSurface is missing from the Resource1 class. Does anyone know if there is any other way to get that object so I can create the BitmapTarget objects?
Thanks in advance.