View Full Version : I want to draw onto multiple forms.

John Jenkins
09-24-2002, 09:08 AM
I want to have two or mor opengl graphs going at the same time. How can I do this?

The GibberingFool
09-24-2002, 10:32 AM
You can in Linux, friend, but as far as Windows is concerned... can't help you. I haven't got the foggiest - but try setting up the rendering context again for a different window?

09-24-2002, 10:52 AM
Can you narrow down what you want to do.

I could just say open the same application a second time.


John Jenkins
09-24-2002, 12:34 PM
I want to draw onto two different forms at the same time in the same program. My program has several graphs and models and I need the ability to show more than one at once.

09-24-2002, 04:07 PM
You need to create a seperate context for each window. Make sure to rebind the context for each window (form) when you're drawing to it. I did this in C++ Builder a long time ago and it worked fine.

09-24-2002, 04:58 PM
First of all, Mr. John Jenkins, shame on you for double posting. Second of all...well, I don't really have a second point, just "shame on you." http://www.opengl.org/discussion_boards/ubb/wink.gif

09-24-2002, 07:24 PM
if you can, it better to create one big window and simulate multiple windows with glScissor() and glViewport().

that way you can avoid the expensive context switch... depends how important performance is for your app.