OpenMiner/source/core/Application.cpp

34 lines
730 B
C++
Raw Normal View History

2014-12-15 16:47:30 +01:00
/*
* =====================================================================================
*
* Filename: Application.cpp
*
2018-06-05 01:24:54 +02:00
* Description:
2014-12-15 16:47:30 +01:00
*
* Created: 14/12/2014 05:09:21
*
* Author: Quentin Bazin, <quent42340@gmail.com>
2014-12-15 16:47:30 +01:00
*
* =====================================================================================
*/
#include "Application.hpp"
#include "Config.hpp"
#include "Mouse.hpp"
#include "GameState.hpp"
2014-12-15 16:47:30 +01:00
void Application::init() {
CoreApplication::init();
2018-06-05 01:24:54 +02:00
createWindow(SCREEN_WIDTH, SCREEN_HEIGHT, APP_NAME);
2014-12-18 07:02:48 +01:00
m_window.setVerticalSyncEnabled(true);
2018-06-05 01:24:54 +02:00
Mouse::setCursorVisible(false);
Mouse::setCursorGrabbed(true);
2018-06-05 16:17:40 +02:00
m_renderer.init(m_window);
2018-06-05 01:24:54 +02:00
m_stateStack.push<GameState>();
}