I have alot of flicker and I want to get rid of it.
I am using MFC and displaying OpenGL graphics in a CView. I use a slider control to manipulate the viewpoint. When the user moves the slider the program calls Invalidate and UpdateWindow which in turn calls OnDraw whichs uses the value from the slider to change the viewpoint. I am not doing anything graphically intensive yet. I have PFD_DOUBLEBUFFER enabled and SwapBuffers(m_pDC->m_hDC)is used in OnDraw.
The flicker probably comes from Windows erasing the view background with solid white whenever you draw to it. I think you can disable this by providing a no-op OnEraseBackground callback handler, but it’s been years since I looked at MFC so my memory’s a little hazy.
Use classwizard to include a handler for WM_ERASEBKGND, and within the code handler it provides, comment out the return that calls the base class as such: