<p>If I have two applications that I've written running on a machine, is it possible to have one application inject triangles into the scene of the other application? So effectively, the data for meshes is coming from two different applications?</p>

CC BY-SA 3.0
2017-06-07T23:01:54.360Z
With or without the cooperation of the app getting injected into? :) If you have control of both apps, you could use shared memory to efficiently communicate mesh data between the processes. Otherwise, you're looking at something like shimming the graphics API.
Nathan Reed
CC BY-SA 3.0
2017-06-08T08:24:30.840Z
Perhaps an ironic question as, no doubt, some effort has to be put into the GPU drivers to prevent parallel applications interfering on the shared resource.
Simon F
CC BY-SA 3.0
2017-06-08T11:07:00.347Z
Yes its called inter process communication. Not in any way specific to graphics programming. Do you mean directly on the GPU?
joojaa
CC BY-SA 3.0
2017-06-08T17:13:23.453Z
If you know the graphics API the other application is using, you can use the concept of dll hooking to inject code. For example, you could hook Present() and use the context to draw your triangles before calling the real Present(). For example: https://www.microsoft.com/en-us/research/project/detours/ or http://easyhook.github.io/ Hooking is how applications like OBS/Fraps do frame overlays and captures.
RichieSams
<rendering>
Can one application inject triangles into the graphics pipeline of another application?
Wilhelm
# Can one application inject triangles into the graphics pipeline of another application?

(Asked by: username_0 on 2017-06-07)

If I have two applications that I've written running on a machine, is it possible to have one application inject triangles into the scene of the other application? So effectively, the data for meshes is coming from two different applications?

**Tags:** rendering

> **Comments:**
> **username_1**: With or without the cooperation of the app getting injected into? :) If you have control of both apps, you could use shared memory to efficiently communicate mesh data between the processes. Otherwise, you're looking at something like shimming the graphics API.  
> **username_2**: Perhaps an ironic question as, no doubt, some effort has to be put into the GPU drivers to prevent parallel applications interfering on the shared resource.  
> **username_3**: Yes its called inter process communication. Not in any way specific to graphics programming. Do you mean directly on the GPU?  
> **username_4**: If you know the graphics API the other application is using, you can use the concept of dll hooking to inject code. For example, you could hook Present() and use the context to draw your triangles before calling the real Present(). For example: https://www.microsoft.com/en-us/research/project/detours/ or http://easyhook.github.io/ Hooking is how applications like OBS/Fraps do frame overlays and captures.  

---

## 0 answers

