Sirithang
Sirithang

Reputation: 145

Grab OpenGL output of an application from another application

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.

Upvotes: 1

Views: 784

Answers (1)

Dr. Snoopy
Dr. Snoopy

Reputation: 56357

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.

Upvotes: 2

Related Questions