blob: b0acda2e29921ac2597b82989859875c83626831 (
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
|
#include "app.hpp"
namespace Magnum::Examples {
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)
}
{
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 Magnum::Examples
|