Discussion:
wxGlCanvas on wxGTK
(too old to reply)
Marc-Antoine Nüssli
2009-05-14 09:39:54 UTC
Permalink
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
Luca Cappa
2009-05-14 13:09:24 UTC
Permalink
Hello,

On Thu, 14 May 2009 11:39:54 +0200, Marc-Antoine Nüssli
Post by Marc-Antoine Nüssli
Does anyone has an idea on the cause of this little but very annoying
problem??
I think that your wxGLCanvas is not using double buffered OpenGL context,
good luck in finding why is that :)

Greetings,
Luca
Marc-Antoine Nussli
2009-05-14 17:15:06 UTC
Permalink
Post by Luca Cappa
On Thu, 14 May 2009 11:39:54 +0200, Marc-Antoine Nüssli
Post by Marc-Antoine Nüssli
Does anyone has an idea on the cause of this little but very annoying
problem??
I think that your wxGLCanvas is not using double buffered OpenGL
context, good luck in finding why is that :)
Thank you for the hint! Indeed, that was just that....

I didn't think it could be the problem as it was working nicely on
wxMSW. Actually, I was not giving the GL_DOUBLE_BUFFER attrib to the
constructor and the default behavior was simply different between GTK
and MSW (It seems to be related to which version of OpenGL you use)
If that can help someone...

MA
Dan Gudmundsson
2009-05-14 17:33:14 UTC
Permalink
Disable compiz /desktop effects.
/Dan
Post by Marc-Antoine Nüssli
Hello,
On Thu, 14 May 2009 11:39:54 +0200, Marc-Antoine Nüssli
Post by Marc-Antoine Nüssli
Does anyone has an idea on the cause of this little but very annoying
problem??
I think that your wxGLCanvas is not using double buffered OpenGL context,
good luck in finding why is that :)
Greetings,
Luca
_______________________________________________
wx-users mailing list
http://lists.wxwidgets.org/mailman/listinfo/wx-users
Loading...