JNGL
AppParameters.hpp
Go to the documentation of this file.
1 // Copyright 2022 Jan Niklas Hasse <[email protected]>
2 // For conditions of distribution and use, see copyright notice in LICENSE.txt
5 #pragma once
6 
7 #include "Vec2.hpp"
8 
9 #include <functional>
10 #include <optional>
11 
12 namespace jngl {
13 
14 class Work;
15 
17 struct AppParameters {
20 
23 
28 
29  std::optional<std::pair<int, int>> minAspectRatio;
30  std::optional<std::pair<int, int>> maxAspectRatio;
31 
33  bool pixelArt = false;
34 };
35 
36 } // namespace jngl
Contains jngl::Vec2 class.
JNGL's main namespace.
Definition: App.hpp:10
Parameters used to initialize the main window.
bool pixelArt
Activates pixel-perfect magnifying of textures (nearest-neighbor interpolation)
std::string displayName
Display name of the application which will be used in the window title for example.
std::function< std::shared_ptr< jngl::Work >)> start
A factory function which creates the first jngl::Work.
std::optional< jngl::Vec2 > screenSize
Size of the canvas in screen pixels, see jngl::getScreenSize()