Marc-Antoine Nüssli
2009-05-14 09:39:54 UTC
Hello,
I am developing an application using wxGlCanvas and I encounter a little
problem when I compiled it on wxGTK.
Basically, my problem is that the GL window flickers when it has to be
refreshed quite often. More precisely, I'm doing a map viewing application
and I had a classical zooming function which proceed by "drawing" a zooming
rectangle with the mouse. So, when the user "draws " the zooming rectangle,
I have to refresh the view for every mouse move and in this case, the window
flicker. It also happens in other cases where I have to make frequent
refreshes.
I don't think it is a GL programming issue because when I compile my app on
wxMSW, it works very well and there is no flicker at all. Moreover, I use GL
lists and thus, there is no extra computation required when redrawing the
scene. I also call glFlush() and SwapBuffer() at the end of my drawing
function. Finally, I have defined the onErasBackground event to do nothing.
And as it works very well with wxMSW, I suspect that it is an issue related
to wxGTK and the way it interacts with OpenGL.
Does anyone has an idea on the cause of this little but very annoying
problem??
Thank you!MA
I am developing an application using wxGlCanvas and I encounter a little
problem when I compiled it on wxGTK.
Basically, my problem is that the GL window flickers when it has to be
refreshed quite often. More precisely, I'm doing a map viewing application
and I had a classical zooming function which proceed by "drawing" a zooming
rectangle with the mouse. So, when the user "draws " the zooming rectangle,
I have to refresh the view for every mouse move and in this case, the window
flicker. It also happens in other cases where I have to make frequent
refreshes.
I don't think it is a GL programming issue because when I compile my app on
wxMSW, it works very well and there is no flicker at all. Moreover, I use GL
lists and thus, there is no extra computation required when redrawing the
scene. I also call glFlush() and SwapBuffer() at the end of my drawing
function. Finally, I have defined the onErasBackground event to do nothing.
And as it works very well with wxMSW, I suspect that it is an issue related
to wxGTK and the way it interacts with OpenGL.
Does anyone has an idea on the cause of this little but very annoying
problem??
Thank you!MA