I’m currently searching inside the engine code to find how to get access to the GPU resources. I need access to the DirectX device (DX11 only) to create a shared texture with another process of my own.
I know that once I will get access to the device, the rest will work. But I don’t find how/where to do that.
I already found that in MediaCapture (inside the runtime/MediaIOCore module) are two lines that are good candidate as entry point.
// Asynchronously copy target from GPU to GPU RHICmdList.CopyToResolveTarget(SourceTexture, DestRenderTarget.TargetableTexture, FResolveParams()); // Asynchronously copy duplicate target from GPU to System MemoryRHICmdList.CopyToResolveTarget(DestRenderTarget.TargetableTexture, InCapturingFrame->ReadbackTexture, FResolveParams());
I suspect that if I can get some of my code near that, I can gain the access to what I want.
If anyone has pointers, you’re welcome.