Jump to content

View more

Image of the Day

The beast has a mighty searchlight of evil! #screenshotsaturday https://t.co/bzKepOojDL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

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   

751
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




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.