Monday, May 17, 2010

Processing User Input

By now, I'm able to render a floating 3D object with transparent background, my first objective is almost achieved.

Now I need to be able to process the user's mouse input, and especially, to let the user to pick something on the 3D object. The following references are useful for this:
http://msdn.microsoft.com/en-us/library/ee418864(v=VS.85).aspx
http://www.microsoft.com/whdc/archive/pointer-bal.mspx
http://www.microsoft.com/whdc/archive/pointer-bal.mspx
http://creators.xna.com/en-US/sample/picking

Friday, May 14, 2010

D3D Rendering with Transparent Background

After several months, I'm finally able to do this. The basic idea has been posted previously, that is use layered window and create a render target which I'm able to get the DC from. Then render everything on this target, then use UpdateLayeredWindow instead of Present to draw the backbuffer.

I have performance penalty but for a small window, it is acceptable.

The last thing I have to deal with is to slow down the FPS. This may relate to the unique way the layered window processes the messages.