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 .
Originally posted by Milo Donati:
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 .
You can’t do this if the other windows do not belong to your process. Period.
This would be a way for other processes messing around with your OpenGL state.
OpenGL handles multiple threads, but not multiple processes writing to the same window.
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.
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.