Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
    
There may be two ways to approach this but neither will work with offscreen or minimized windows: A) Capture the desktop (DWM Vista/7) and use Win32 functions to figure out where a given window is within that screen shot or B) Attempt to capture & hook each individual window and whatver api it is using (which may be extremely difficult to monitor if it is a win32 app that only updates what has changed). Either way you will then update a texture in your program and render a poly with it. –  NtscCobalt Sep 10 '12 at 19:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.