How to get DirectX shared texture handle that is used in TouchEngine TOP Input?

I would like to ask how could one go about getting handle of shared DirectX texture that is used for passing texture to TouchEngine?

I am assuming DirectX texture sharing is used in TouchEngine In/Out TOP based on this post:

I would like to utilize it in a scenario for passing texture from UE4 to TD (editor) while using TouchEngine-UE4 Plugin as a middleman. I am assuming it would be possible to directly consume UE4 texture inside of TD (editor) by using DirectX In TOP with proper handle.

This is related to following topic. It doesn’t solve genlocking, but consuming texture from UE4 directly inside of TD (editor) would reduce latency and overhead.

If you are only using TouchEngine for this purpose, because you want a shared DirectX texture, this won’t work using the UE4 plugin as-is. One could in theory modify it but you would have to create and fill the DirectX shared textures yourself, at which point, why involve TouchEngine at all? It sounds like you need a custom plugin at least on the UE4 end, and possibly on the TouchDesigner end, to manage a shared surface yourself. You might get something close to sync if your shared texture is backed by a DXGI keyed mutex and you are careful in your acquire/release calls.

Aha, I see, thank you very much for explanation. I just thought I could somehow use TouchEngine-UE4 Plugin - so that I won’t have to write custom plugin. I guess that was a bit naive thinking :slight_smile: