I've started to do sth.something with SDL/openGLOpenGL, but I haven't managed to get this tutorial running yet: (http://www.sdltutorials.com/sdl-opengl-tutorial-basics).
Since this tutorial, or most tutorials at all, are written in SDL 1.2, I changed just this part of the tutorial's code:
instead of:
if((Surf_Display = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE | SDL_GL_DOUBLEBUFFER | SDL_OPENGL)) == NULL)
to:
SDL_Window *window;
if((window = SDL_CreateWindow("SDLWindow", SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
640, 480,
SDL_GL_DOUBLEBUFFER | SDL_WINDOW_OPENGL)) == NULL)
Now, all parts of the code seem to be correctlycorrect, except the last one,: this is "SDL_GL_SwapBuffers()";
SDL_GL_SwapBuffers();. Xcode says: use of undeclared identifier....
I think it's deprecated in SDL 2.0, but I couldn't find the right function in the migration guide, or is the problem something else?
Can anyone help me with that?