• Advertisement
Sign in to follow this  

[SlimDX] Direct2D Interop

This topic is 2895 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

How do I get a DXGI Surface from a Direct3D 10 Texture2D? I want to use Direct2D to render into a Texture2D.

Share this post


Link to post
Share on other sites
Advertisement
I've come up with a solution, but it's not ideal. I added the following code to SlimDX's SurfaceDxgi.cpp:


Surface^ Surface::FromComObject( ComObject^ object )
{
IDXGISurface* buffer;
RECORD_DXGI( object->UnknownPointer->QueryInterface(&buffer) );
if( Result::Last.IsSuccess )
return Surface::FromPointer( buffer );

throw gcnew DXGIException ( Result::Last );
}


Is there another way to accomplish this without modifying the library? Or is the functionality just plain missing from SlimDX?

Share this post


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

  • Advertisement