Video signal deformation

I have a problem that may not be OGL related, but the solution might be, so I hope not being too much OT. Here it is :

I need to deform, a bit like a fish eye view, a video signal, in real time. But, depending on the feasability of the solutions for this problem, the input signal may be restrained on the output of a 3D engine (supposed to be the general case). We could restrain even more, on the output of an OpenGL based 3D renderer.

As other applications (standard video, still pictures, web pages) might arise in the future, the preferred solution would be to deform anything that ouputs to screen.

It has to be real time as the application may be interactive, and I need to support the possibility that the video signal may come from another PC, plugged in the input slot of the video card. Actually, I suppose it may be the easiest way to do, but I don’t have any experience on this. Anyway, I’d like to know how to do for both cases (a single PC, or 1 PC for input, and a second one for final output).

Are there any solutions for this ?

Thanks,
SeskaPeel.

I’ve done this with OpenGL, it’s called distortion correction and it’s very specific to your display setup.

The remapping can be performed by sending the image to texture memory and drawing a mesh of textured polygons to deform the image on the display.

The exact geomerty of how you do this can take some raycasting from the viewer and back projection into the projector.

Thanks for your fast answer dorbie.
Your solution was the one I first thought of. But, the main problem here is that the input signal comes from a third party app. So I can’t “render to texture” as I would from my own renderer (or at least I don’t know how to). And what’s more, the input signal may come from a 3D engine or come from Windows Media Player or any other application that could display 3D (and even 2D actually) … so I can’t have any clue neither on the position of the eye neither on anything else.

Obviously, a 3D renderer running on the same computer will ask for a high performance system, so my application needs to be optimized. I fear that grabbing the content of the system video memory and redisplaying it on screen will affect performance a lot … is there a specific function to do this? (actually, it should even be able to grab the windows desktop and deform it)

Thanks,
SeskaPeel.

Seems like I need to grab the entire desktop, whatever is displayed on it. I’ll look in DirectShow and win32 API … hope I’ll find what I need. Maybe there are some hidden wgl functions to do this ?
And if there aren’t, is there a way to grab desktop and display it in OpenGL, or will I have to do this in D3D ?

Thanks,
SeskaPeel.