PDA

View Full Version : Opengl Ocx



Hazem_vb
09-29-2002, 12:43 PM
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

I HOPE YOU ANSWER ME PLEASE ?

jra101
09-29-2002, 12:46 PM
You might have to make the rendering context for each control "current" using wglMakeCurrent before doing any drawing.

vshader
09-29-2002, 12:48 PM
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?

Robbo
09-30-2002, 07:27 AM
btw - if they are in-process controls, you have to be careful about globals - especially singletons - which are used a lot in graphics projects.