Hello all
i am a beginner in OpenGL, i am using TAO framework with C#,
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
but the rotation still have some work it is still not updated till the re-sizing process stop
here is my code
it is still not updated till the re-sizing process stop
That’s because windows is event driven. When you are resizing the window an event is fired and the processing does not end until you stop the resizing with the mouse.
So, if you want GL to carry on rendering and rotating objects, then you’ll have to setup a separate thread and transfer all OpenGL rendering and main loop to that thread.
First of all, what were you trying to do with the code above?
Separate threads? What you need to do is keep anything OpenGL related to the same single thread. That thread will create the GL context and render stuff to the window/context.
No other thread can touch GL related data or context (keeping things simple). If you are getting memory access issues then it sounds like thread 1 is trying to access resources ‘owned’ by thread 2 or visa-versa.
I think the better question is why do you want your object rotating while the window is being resized?
Resizing is something that the user does on a rare occasion so it should not be a problem for any type of app.