When I was using SDL alone for the graphics, SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1); did the job, but now that I am using SDL as a container for OpenGL, with OpenGL being used for graphics, it does not work and the problem is back. I have been looking for a solution for a little over an hour now but I have had no luck. Is there a simple, cross-platform solution that I am missing here? I would like to be able to do it using what is already available in SDL.h and SDL_opengl.h. I have tried including glx.h, using the -glx compiler flag, and using glXSwapIntervalEXT(1);, but I received an undefined reference to that and want to avoid using extensions anyway (so I don't have to worry about different ones for different platforms and all of that). Thank you!