I'm trying to get OpenGL to work with SDL and I've set up SDL so that it works and so that I can use it, but the thing is that I can't get OpenGL to work.
I want to use OpenGL to render and SDL to do all of the other stuff (SDL_opengl). I've linked to SDL, but when I write anything related to OpenGL in my code, I get linker errors when I compile the application.
"1>main.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function "public: void __thiscall Player::show(void)" (?show@Player@@QAEXXZ)"
I guess I have to link to OpenGL as well, but the thing is that I don't know how to do that, I've tried with 'SDL_opengl', '-lopengl32', 'lopengl32', 'opengl32' and so on, but then I get the error "can't open opengl32.obj".
Is the problem that I have to link to OpenGL as well and if so, how do I link it and do I need to download any additional OpenGL files?
Yes I have. I'd recomend you to have a look at this tutorial: http://lazyfoo.net/SDL_tutorials/lesson36/index.php
If you just want a short answer from me, you basically just add the constant "SDL_OPENGL" in the 'SDL_SetVideoMode' funtion for example like so: "SDL_SetVideoMode( x, y, 32, SDL_OPENGL )" You can also add other parameters if you wish to by using the bitwise OR symbol (|) like so: ( SDL_OPENGL | *Other constants* )