blob: cc5dbe78d705bbc6b3b8b47a6fa412d1b377e09a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "app.hpp"
#include "compat/fpu.hpp"
namespace floormat {
app::app(const Arguments& arguments):
Platform::Application{
arguments,
Configuration{}
.setTitle("Test")
.setSize({1024, 768}, dpi_policy::Physical)
.setWindowFlags(Configuration::WindowFlag::Resizable),
GLConfiguration{}
.setSampleCount(4)
.setFlags(GLConfiguration::Flag::GpuValidation)
}
{
set_fp_mask();
reset_camera_offset();
update_window_scale(windowSize());
timeline.start();
}
void app::update(float dt)
{
do_camera(dt);
if (keys[key::quit])
Platform::Sdl2Application::exit(0);
}
} // namespace floormat
|