Use this function to update a window with OpenGL rendering.
void SDL_GL_SwapWindow(SDL_Window* window)
the window to change
You can add your code example here
This is used with double-buffered OpenGL contexts, which are the default.
On Mac OS X make sure you bind 0 to the draw framebuffer before swapping the window, otherwise nothing will happen. See this blog post for more info.