Call SDL_GL_SetAttribute() before the window is created.