Opengl Ocx

I had build an Activex Control that can

plot 3D Surfaces with VC++ (Opengl) .

But When I insert the control in a vb form

and take 2 instances on the form i found

that the first instance deactivated where the

second is enabled .when i insert a third one

i found that the first and the second

instances deactivated and the third run and

so on .

Does That Problem in the double Buffer Of

OpenGL .I Mean when I use the new instance

its double buffer replaces the Old One


You might have to make the rendering context for each control “current” using wglMakeCurrent before doing any drawing.

you should be able to have 20 separate openGL windows running at once if u want… it will be slow from the context switches, but it should work.

here’s a few guesses:

maybe the “deactivated” ones just aren’t calling glSwapBuffers()?

have you made a separate gl context for each window, and do you make it current before you try drawing to it?

have you put idle timers in your code to update the windows even when they don’t have focus?

what do you mean exactly by “deactivated” anway? blank? frozen?

btw - if they are in-process controls, you have to be careful about globals - especially singletons - which are used a lot in graphics projects.