0

I want to get other process's window handle to render it on GL program.

What i want to do is this.

  1. Set a GL vertex array, and index buffer object.
  2. Make a 1 texture.
  3. Get other process's framebuffer and copy this buffer's data to texture i made above.
  4. GL's Fragment shader use this texture and draw it on cube's faces.

Is it possible to get other process's windows handle or framebuffer with Apple's system library?

Target Platform is MacOS 12.01 Monterey. OpenGL 4.0. and Language is C++.

  • 1
    There are multiple ways to do this that can depend on the OS, the graphics API the other program is using, your video card, and whether the other application is protected by any DRM (or maybe anti-cheat). There isn't a single cross-platform way to do this either, so your question is too broad without narrowing down some of those variables and to a specific OS. – Romen Dec 13 '19 at 21:53
  • On windows. how can I...? No DRM and GTX 1070 I used. –  Dec 14 '19 at 06:09
  • 1
    For most applications, you can use the [Desktop Duplication API](https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/desktop-dup-api). For DirectX you can use [this answer](https://stackoverflow.com/a/10104439/9516968) for several different approaches too. – Romen Dec 16 '19 at 20:55

0 Answers0