Hacker News new | ask | show | jobs
by torginus 951 days ago
On Windows and DirectX, you have the concept of Shared Handles, which are essentially handles you can pass between process boundaries. It also comes with a mutex mechanism to signal who is using the resource at the moment. Fun fact - Windows at the kernel level works with the concept of 'objects', which can be file handles, window handles, threads, mutexes, or in this case, textures, which are reference counted. Sharing a particular texture is just exposing the handle to multiple processes.

A bit of reading if you are interested:

https://learn.microsoft.com/en-us/windows/win32/direct3darti...