1

I would like to know if it's possible, in C/C++, to launch an application and grab its standard video output?

The goal of this would be to grab the buffer of an application, and use it as a texture for a grid of vertex with special texture coordinate (in order to project it in a FullDome)?

I'm developing under Linux.

Sirithang
  • 125
  • 2
  • 9

1 Answers1

2

Theoretically, it's possible. Is the other application using OpenGL? Or is just any X11 application?

If is just an X11 app, you need to do what a compositing manager does, which is use the COMPOSITE X extension to get window contents, and then process them.

If is just a OpenGL app, and you can modify it, you can use a FBO to draw everything to a texture, and use shared memory (SHM) to share the texture data with the other application.

smokris
  • 11,740
  • 2
  • 39
  • 59
Dr. Snoopy
  • 55,122
  • 7
  • 121
  • 140