Drawing 2D windows using Direct3D

Started by
-1 comments, last by Axter 21 years, 9 months ago
This might be an old topic, and somebody probably tried this, but I was just wondering if the following idea was worth experimenting with: I''m thinking of intercepting the WM_PAINT, WM_NCPAINT, WM_ERASEBKG etc messages of a typical Win32 window, and instead of letting GDI draw these things, using Direct3D to draw all the elements that make up a 2D window. At first, there doesn''t seem to be any benefit, but I''m thinking that one can do some cool 3D animations, etc when drawing typical buttons, checkboxes, title bars, etc. Has anybody tried this, or does anybody know of some demo doing something similar? I heard some rumors that Microsoft''s next OS, codename Longhorn, is supposedly going to require a beefy 3D card. One can only speculate that they might want to do something similar. If this was done properly in the OS level, I''m sure it could make for an interesting UI. For instance, I have this idea that the "desktop" is moved further "away" from the user, to leave some "space" between the screen and the desktop. Now, 2D windows can be made to look somewhat 3D by making them adjust their 3D "depth" depending on their Z order. The topmost window will be closer, and will be "zoomed" in a little bit. Windows behind other windows will be furthur away, and will be smaller than normal (including controls, title bars, etc). This also opens some interesting effects when you click on windows to bring them to the foreground, making them "float" to the top, etc. I''m thinking this will be great, since most PCs these days have a 3D card that sits idle 90% of the time as we work in 2D mode. There''s no reason this processing power can''t be used in some creative ways when we do our boring 2D computing. For all I know this idea has been rehashed here before, since it''s been a while that I went through these forums. Anyway, what is your take on this? Axter
SS

This topic is closed to new replies.

Advertisement