Application window as polygon texture?

Posted by nekome on Game Development See other posts from Game Development or by nekome
Published on 2012-09-10T19:00:59Z Indexed on 2012/09/10 21:50 UTC
Read the original article Hit count: 127

Filed under:
|
|

Is there a way, or method, to have some application rendered as texture in 3D scene on some polygon, and also have full interactivity with it?

I'm talking about Windows platform, and maybe OpenGL but I guess it doesn't matter is it OGL or DX.

For example: I run Calculator using WINAPI functions (preferably hidden, not showing on desktop) and I want to render it inside 3D scene on some polygon but still be able to type or click buttons and have it respond.

My idea to realize this is to have WINAPI take screenshot (or render it to memory if possible) of that Calculator and pass it to OpenGL as texture for each frame (I'm experimenting with SDL through pygame) and for mouse interactivity to use coordination translation and calculate where on application window it would act, and then use WINAPI functions such as SetCursorPos to set cursor ant others to simulate click or something else.

I haven't found any tutorials with topic similar to this one.

Am I on a right track? Is there better way to do this if possible at all?

© Game Development or respective owner

Related posts about textures

Related posts about Windows