Jump to content

  • Log In with Google      Sign In   
  • Create Account

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 AvengerDr   Members   -  Reputation: 726

Like
0Likes
Like

Posted 18 June 2013 - 04:05 AM

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.

--Avengers UTD Chronicles - My game development blog

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS