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?

  • 4
    $\begingroup$ 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. $\endgroup$ – Nathan Reed Jun 7 '17 at 23:01
  • $\begingroup$ 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. $\endgroup$ – Simon F Jun 8 '17 at 8:24
  • 1
    $\begingroup$ Yes its called inter process communication. Not in any way specific to graphics programming. Do you mean directly on the GPU? $\endgroup$ – joojaa Jun 8 '17 at 11:07
  • 1
    $\begingroup$ 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: microsoft.com/en-us/research/project/detours or easyhook.github.io Hooking is how applications like OBS/Fraps do frame overlays and captures. $\endgroup$ – RichieSams Jun 8 '17 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.