I need to be able to access the frame buffers of certain 3rd-party OpenGL and DirectX programs in order to capture the image that is output to the screen and redraw it, distorted at the edges. I’d like to be able to warp the image onto a mesh, such that a normal OpenGL or DirectX surface image is re-shaped for image projection (like a software-level keystoning, for example).
As the 3rd-party programs are not written by me, I need some way of accessing the graphics card buffer into a useable format, in real-time, applying the distortion (probably as a 2d texture onto a quad?) and then re-outputting the result to screen. This output can either be to the original window, or to a dedicated window owned by my program’s process - it doesn’t matter which.
Does anyone have any ideas on the first steps to take with this?
I would personally write a plugin for GLIntercept to to this (at least for OpenGL apps)
Sinly before each frame buffer swap, create a texture from the frame buffer, do the distortion, and paste back. (If the apps in question use a FBO for main rendering, you can probably intercept that)