Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Drawing 2D windows using Direct3D

This topic is 5958 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!