How to distort the desktop screen

Hi friends,
I want to distort the desktop screen, so I can project the desktop on any curved screen. I think I must get the projection matrix of the screen coordinate at first. Then transform the matrix, and map the desktop buffer to the distorted mesh. Would you please give me some tip on it. Thank you very much in advance.

Please refer to the picture:


What I want to implement is to change the shape of the screen, as the same with mapping the screen to an 3D mesh. The shapes of all the programs run on the OS are changed with the distortion of the screen. It’s realtime. The user can still operate the OS on the distorted screen as usually.For examples click the shortcut to run a program, open the ie to surf the internet. Thanks!

some mornings it looks that way before I have coffee

some mornings it looks that way before I have coffee

You must sit up late!!

This looks very interesting, would like to learn how to do this myself. :slight_smile:

I’m investigating this. But I still don’t find a solution for it. Would you please give me some tip? Thanks!!

there are a few steps:

1 you need to capture the desktop in realtime
2 you need to avoid having a feedback loop between the app and the desktop
3 you need to warp the image

doing 1 isn’t so hard, i know how to do it on OSX and windows might have something similar. but you should make sure you can do this first.

doing 2 can be a little harder. on OSX you can say what applications you want to capture as part of the screencapture, and you can avoid capturing your own application. alternatively, you could try using an external monitor to run the app while capturing on another monitor.

3 is the easiest i think, maybe a short fragment shader <10 lines should do the kind of displacement you have in mind.

what OS are you developing for?