HI everybody!!
I am programing a simple application based on TAO(Visual C#), I am OpenGL novice.
I have one form (f1) with single simpleopenGLcontrol (s1) for drawing just one "signal1" for instance.
This form has a button to create another form (f2) with another single simpleopenGLcontrol (s2) for drawing just one "signal2" for instance.
I will expose my problem:
When I move f1 over f2 or viceversa, signal1 drawing goes to f2 and signal2 drawing goes to f1, and so on. In addiction to this each single redraw event for f1 or f2 works properly, although together does not work at all.
My OpenGL initialization for f1::
public Form1()
{
InitializeComponent();
this.s1.InitializeContexts();
Gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
Gl.glShadeModel(Gl.GL_FLAT);
Gl.glEnable(Gl.GL_DEPTH_TEST);
Gl.glEnable(Gl.GL_CULL_FACE);
Gl.glDisable(Gl.GL_DOUBLEBUFFER);
Glut.glutInit();
}
My OpenGL inicialization for f2::
public Form2()
{
InitializeComponent();
this.s2.InitializeContexts();
Gl.glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
Gl.glShadeModel(Gl.GL_FLAT);
Gl.glEnable(Gl.GL_DEPTH_TEST);
Gl.glEnable(Gl.GL_CULL_FACE);
Gl.glDisable(Gl.GL_DOUBLEBUFFER);
Glut.glutInit();
}
I suppose that each simpleOpenGLcontrol has a individual context, but I think both forms uses same context due to this unexpected behaviour.
Please could you help me?
What can I do to check this?
Thanks in advance
Regards