I have an external opengl based library which I’m trying to integrate in my application. It renders properly if SwapBuffers() is removed from the rendering function. If I keep swapbuffers(), it keeps flicker whenever the window is zoomed or panned. Moreover it is not displayed when no mouse event is performed. My render functions contain opengl commands which very much requires SwapBuffer() function.
How do I avoid this flickering? I feel probably the library renders on back buffer frame, and when the swap buffer is called it gets washed away, thus resulting in display for a fraction of second and disappear. Any suggestions/solutions?