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 image to the distorted mesh. Are there any interfaces which can modify the shape of the desktop screen in OpenGL or DirectX? Would you please give me some tip on it. Thank you very much in advance.

The following picture is the effect:

BR,
Haifeng

Seems like the path would be:

  1. write a screen capture routine to store the desktop as a bitmap (or rgb). Not sure how to do it on windows, but bush’s internets could probably help.
  2. finely tesselate a rectangle of the appropriate aspect to represent the screen. Choose some coordinates, maybe 0, w, 0, h for this.
  3. Use standard opengl to texture the tesselated mesh with the screen bitmap and use a vertex shader to apply a warping wave to the tesselated mesh.

Would be static. A much more difficult task to make the thing interactive (pretty much impossible unless you are a windows systems programming nut).

Thank you!
I want to change the shape of the desktop screen, so what are displayed on the desktop will be distorted at the same time. And the user can still operate the PC with the mouse on the distorted desktop(Run the applications, Open the “My Computer” and so on). I think there should be some interfaces which can get the projection matrix which is used for desktop display. If we can get the projection matrix, we can distort the desktop as any shape, even in the 3D coordinate.

One direction which I’m investigating is the low-level interface of Windows. Then the display driver should be investigated also.

BR,
Haifeng

One of the issues is that the complete desktop in Win7 is by default composited in the gpu AFTER windows apps play with it. Even an openGL app window is only seen as a bitmap to the new windows manager, and the gpu decides how to layer these bitmaps.
I’d doubt you can get in there behind the scenes to warp your screen in realtime unless you want to intercept or overide the gpu itself. This is what Aero is.

But if Aero is off, it might be possible.

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!

I want to change the shape of the desktop screen, so what are displayed on the desktop will be distorted at the same time. And the user can still operate the PC with the mouse on the distorted desktop(Run the applications, Open the “My Computer” and so on). I think there should be some interfaces which can get the projection matrix which is used for desktop display. If we can get the projection matrix, we can distort the desktop as any shape, even in the 3D coordinate.

To my knowledge, there is no possible way to do what you’re suggesting. In D3D or OpenGL. On Windows or MacOSX (some flavors of Linux might allow you to insert some low-level code into X-Windows or whatever they use as their base window manager. But it probably wouldn’t be OpenGL code). You simply are not allowed to globally affect the functioning of other actual windows, and you certainly are not allowed to affect how the OS draws those other windows.

Hi Alfonse, I heard from some friends that there isn’t the projection matrix which is used for desktop display. But I want to change the shape of the screen, Is there any method to finish the functionality? Thank you very much!!

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.