• Advertisement
Sign in to follow this  

DirectX11 and Stereo, how to get a Surface object for Direct2D?

This topic is 1681 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all,
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.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement