From: Ian Krepps <Ian.K<repps@rm...> - 2005-01-12 13:37:21
I'm having a problem with vertical synchronization/refresh with a map browser application.
When the application is running and I am scrolling around the map space I see a subtle vertical shift that starts at the bottom of the screen and flows to the top.
I am using a wxGlCanvas, the scrolling display is updated on a 12 ms recursive animation timer. My first thought was that there were perhaps other timers in the application firing off, this was not the case. I then checked the vertical sync setting on the video card, it was on. So far so good
The code snippet is below:
def OnPaint(self, event=None):
dc = wx.PaintDC(self)
self.SetCurrent() #set this canvas to recieve Opengl calls
self.DrawGL() #call to draw opengl model
From my understanding SwapBuffers() will sync the buffer swap with the vertical refresh of the hardware. I believe the problem my be in the glCanvas. After searching through various posts it seems the glcanvas does double buffer, but when I check the class reference documents there is a Constant WX_GL_DOUBLEBUFFER. Is it necessary to include this constant? In addtion I'm not sure about the syntax since these constants are in a attribList.
I think this may be the crux of the problem, any suggestions would be appreciated.