blob: dffb19e1953c24a4b80ec0702bf76c733bf8dcee (
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#include "app.hpp"
#include "loader.hpp"
#include <filesystem>
#include <Corrade/Containers/Pair.h>
#include <Corrade/Containers/StringStlView.h>
#include <Corrade/Utility/Path.h>
#include <Magnum/Magnum.h>
namespace Magnum::Examples {
app::app(const Arguments& arguments):
Platform::Application{
arguments,
Configuration{}
.setTitle("Test")
.setSize({1024, 768}, Platform::Implementation::Sdl2DpiScalingPolicy::Physical),
GLConfiguration{}
.setSampleCount(4)
.setFlags(Platform::Sdl2Application::GLConfiguration::Flag::Debug)
}
{
if (auto path_opt = Utility::Path::executableLocation(); path_opt)
std::filesystem::current_path(std::string{Utility::Path::split(*path_opt).first()});
}
app::~app()
{
loader_::destroy();
}
void app::drawEvent()
{
test();
Platform::Sdl2Application::exit(0);
}
void app::test()
{
test_json();
}
} // namespace Magnum::Examples
using namespace Magnum::Examples;
MAGNUM_APPLICATION_MAIN(Magnum::Examples::app)
|