void GameManager::Init() { doExit = false; deltaTime = 0.0f; enemyTimer = 0.0f; enemyTimer2 = 0.0f; score = 0; CamEye = Point(0.0f, 25.0f, 14.0f); CamCenter = Point(0.0f, 0.0f, -13.0f); CamUp = Point(0.0f, 1.0f, 0.0f); setOpenGLStates(); //Initialize objects Utility::I()->Sound->GameMusic(); CBullet bulletObj(Point(0,-100,0),1,false); skybox = new CSkybox(); shipObj = new CShip(deltaTime); //Player object shipObj->SetDeltaTime(deltaTime); worldObj = new CWorld(deltaTime); particleObj = new CParticles(deltaTime); planet = new CPlanet(deltaTime, Point(-55, 0, -90)); fpsTimer.reset(); timer.restart(); ResizeWindow(window_width, window_height); }
void AppManager::init(){ /* Initialize the library */ if (glfwInit() != GL_TRUE) { THROW_EXCEPTION("Failed to initialize GLFW"); } glfwSetErrorCallback(error_callback); createOpenGLContext(); setOpenGLStates(); createFBO(); createProgram(); createVAO(); applyInitial(); }