Original Post
[color=#333333]Hello all
[color=#333333]i am a beginner in OpenGL, i am using TAO framework with C#,
[color=#333333]i noticed that my render control stooped updating while re-sizing the window, i had overcome the problem of updating the content of the render control by calling the my game loop function in the event handler of the form re-size event
[color=#333333]but the rotation still have some work it is still not updated till the re-sizing process stop
[color=#333333]here is my code
[color=#333333]void GameLoop(double elapsedTime)
[color=#333333]{
[color=#333333]Gl.glViewport(0, 0, _openGLControl.Width, _openGLControl.Height);
[color=#333333]////////////////////
[color=#333333]float r = Color.DarkBlue.R / 255.0f;
[color=#333333]float g = Color.DarkBlue.G / 255.0f;
[color=#333333]float b = Color.DarkBlue.B / 255.0f;
[color=#333333]float a = Color.DarkBlue.A / 255.0f;
[color=#333333]Gl.glClearColor(r, g, b, a);
[color=#333333]Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
[color=#333333]Gl.glRotated(40 * elapsedTime, 0, 1, 0);
[color=#333333]Gl.glBegin(Gl.GL_TRIANGLES);
[color=#333333]{
[color=#333333]Gl.glColor3d(1, 1, 0);
[color=#333333]Gl.glVertex3d(-0.5,-0.5, 0);
[color=#333333]Gl.glColor3d(0, 1, 1);
[color=#333333]Gl.glVertex3d(0.5, -0.5, 0);
[color=#333333]Gl.glColor3d(1, 0, 1);
[color=#333333]Gl.glVertex3d(0, 0.5, 0);
[color=#333333]}
[color=#333333]Gl.glEnd();
[color=#333333]Gl.glFinish();
[color=#333333]_openGLControl.Refresh();
[color=#333333]}
[color=#333333]private void Form1_Resize(object sender, EventArgs e)
[color=#333333]{
[color=#333333]PreciseTimer _timer = new PreciseTimer();
[color=#333333]GameLoop(_timer.GetElapsedTime());
[color=#333333]}
[color=#333333]i am a beginner in OpenGL, i am using TAO framework with C#,
[color=#333333]i noticed that my render control stooped updating while re-sizing the window, i had overcome the problem of updating the content of the render control by calling the my game loop function in the event handler of the form re-size event
[color=#333333]but the rotation still have some work it is still not updated till the re-sizing process stop
[color=#333333]here is my code
[color=#333333]void GameLoop(double elapsedTime)
[color=#333333]{
[color=#333333]Gl.glViewport(0, 0, _openGLControl.Width, _openGLControl.Height);
[color=#333333]////////////////////
[color=#333333]float r = Color.DarkBlue.R / 255.0f;
[color=#333333]float g = Color.DarkBlue.G / 255.0f;
[color=#333333]float b = Color.DarkBlue.B / 255.0f;
[color=#333333]float a = Color.DarkBlue.A / 255.0f;
[color=#333333]Gl.glClearColor(r, g, b, a);
[color=#333333]Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
[color=#333333]Gl.glRotated(40 * elapsedTime, 0, 1, 0);
[color=#333333]Gl.glBegin(Gl.GL_TRIANGLES);
[color=#333333]{
[color=#333333]Gl.glColor3d(1, 1, 0);
[color=#333333]Gl.glVertex3d(-0.5,-0.5, 0);
[color=#333333]Gl.glColor3d(0, 1, 1);
[color=#333333]Gl.glVertex3d(0.5, -0.5, 0);
[color=#333333]Gl.glColor3d(1, 0, 1);
[color=#333333]Gl.glVertex3d(0, 0.5, 0);
[color=#333333]}
[color=#333333]Gl.glEnd();
[color=#333333]Gl.glFinish();
[color=#333333]_openGLControl.Refresh();
[color=#333333]}
[color=#333333]private void Form1_Resize(object sender, EventArgs e)
[color=#333333]{
[color=#333333]PreciseTimer _timer = new PreciseTimer();
[color=#333333]GameLoop(_timer.GetElapsedTime());
[color=#333333]}