void GameManager::render() { //First, make sure our framebuffer is empty glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glLoadIdentity(); glPushMatrix(); world.Render(); ship->Render(); spawnManager.Render(); bulletpool.Render(); glPopMatrix(); checkGLErrors(); }
void GameManager::init() { // Initialize SDL if (SDL_Init(SDL_INIT_EVERYTHING) < 0) { std::stringstream err; err << "Could not initialize SDL: " << SDL_GetError(); throw std::runtime_error(err.str()); } atexit( SDL_Quit); createOpenGLContext(); setOpenGLStates(); //Finally check for errors checkGLErrors(); world.Init(); }