So here is my code:
void Game::init()
{
SDL_Init(SDL_INIT_EVERYTHING);
_window = SDL_CreateWindow("Game Engine", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, _screenWidth, _screenHeight, SDL_WINDOW_OPENGL);
}
This isn't working for some reason, but it works fine when I replace SDL_WINDOW_OPENGL with something like SDL_WINDOW_RESIZABLE or SDL_WINDOW_FULLSCREEN. It also doesn't work when I use SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN. Anything I can do?
I'm using Kdevelop with Ubuntu, if that makes any difference.
Update:
So I figured out what was wrong. It turns out that when you build SDL with both GLX and EGL support, it always uses EGL. I had to compile it with --disable-video-opengles
SDL_GetError()say? - Tristan Brindle