Implementing a DX9Ex Shared RenderTarget as a Shared Resource with DX11

Ok, this is a terrible idea, but I want to try it as a proof of concept as it will really help us in the long run.

We are currently uplifting 5 years of development of our game, from our in house engine into UE4, but it is a long process. Our game is very modular. A Design/Sandbox suite and a Tycoon game component using the designs/data from the design suites. The design suites are in our in house engine. 5 Years ago was a different world, with no UE4 and Unity was just taking its first steps into supporting dev on Windows. We want our game to have long legs, hence the port to UE4.

Anyway the in house engine is DX9 based. With Vista+ the DirectX API’s give the ability to create shared resources between DirectX Devices (even between DX9 and DX11). See this page for details: ID3D11Device::OpenSharedResource (d3d11.h) - Win32 apps | Microsoft Docs

All Game logic is all in Lua, it is just data models of real world items. It is the only data that has to pass between the in house game engine world and UE.

So if you have put 2 and 2 together by now. I want to effectively build our in house game engine as a plugin into UE4. Rendering into a RenderTarget that I can present to the screen for the designer aspects only. We can then continue to develop the new tycoon aspects while also uplifting the design suites until we can finally drop the in house engine.

Now thanks to the various plugins (such as Oculus) I have a good example of how to get to the D3D11Device and create a texture etc. But what I am at a bit of a loss is to try and find how to get this into a UTexture2D or similar to use on an Image Widget.

Does anyone know where to look? Classes and function wise? And what the call/function flow would look like?

Cheers!