Hi at all,this is my problem:
I have to do a program in c#(c++,vb.net…)that use opengl and display image,write,paint in other running opengl windows…i get this window handle whit windows api but i don’t know paint in it .
Sorry for my english mate:)…and tks for help me
You will use the Windows handle and create an OpenGL context using it.
NEHE has some good examples about creating OpenGL context’s.
You may need to use:
HWND hWnd // handle to a window
To get a handle to a device context.
You can’t do this if the other windows do not belong to your process. Period.
Yes you can if you do it right, I did it with my OpenGL applets to show in a web browser with high performance. And Adobe use it for their Acrobat reader plugin, but not using OpenGL of course.
You will need to create a child window (without a border, like a popup) exactly over the client area in the window you want to draw to.
You can do it!
Wanna split some hairs?
A window overlaying the other process’ window is not rendering into the other process’ window but into yours.
But the question was how to render additional data with OpenGL into another application’s window which already uses OpenGL for its own rendering.
Overlaying that with your own child window will change the clipping situation of the other window and a refresh of the underlying window will not work anymore with your child window on top unless you can make it transparent so that it doesn’t affect clipping. I doubt that MS Windows can handle that on OpenGL windows. It doesn’t even handle transparent menus correctly.
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.