I made some progress on these points. Now I'm able to draw something with a texture and light it up. Also, I can alpha blend the texture so that it appears translucent or with an irregular shape as defined by the mask. That is quite cool.
However, what I really want to achieve is something more sophisticated. Say, ultimately, I want to have a 3D figure floating on top of the desktop, with no window boarder, nothing. It seems that I have to use a irregular shaped window so the 3D figure itself defines the window boarder.
The first idea is to get the screen covered by the my program and then render my 3D figure on top of it so that I can create an effect that the 3D figure is floating on top of the desktop. But it does not work quite well because it performs very badly, the window flickers.
Another idea is to use a transparent window and render the 3D figure on top of a certain rarely used color and make this color as the mask color so it is transparent on the client window.
Finally, maybe I can try to use the irregular window based on the SetWindowRgn technique. But a similar performance problem is how to setup the window's region efficiently. If I setup the window region pixel by pixel from the rendered 3D figure, it should be very slow, one can afford doing this normally only once when the program loads.
I'll try the second and the third.
Thursday, February 18, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment