I'm getting a segfault that GDB says is coming from SDL_GL_SwapBuffers. However, I can't imagine why. The SDL documentation mentions no specific pre-conditions for calling swapBuffers except that double buffering be allowed. Is this an option I have to turn on while initializing OpenGL or is this a hardware capability thing?
My code:
(Ignore the unused variables, strange comments and other things. I haven't prettied this up at all. :P)