36 #include "eng3d/ttf.hpp"
37 #include "eng3d/io.hpp"
38 #include "eng3d/ui/ui.hpp"
39 #include "eng3d/audio.hpp"
40 #include "eng3d/material.hpp"
41 #include "eng3d/model.hpp"
42 #include "eng3d/texture.hpp"
43 #include "eng3d/string.hpp"
44 #include "eng3d/event.hpp"
63 State(
const std::vector<std::string>& pkg_paths);
72 void do_run(std::function<
bool(
void)> cond, std::function<
void(
void)> event, std::function<
void(
void)> render);
108 #if defined E3D_BACKEND_OPENGL || defined E3D_BACKEND_GLES
112 std::map<std::string, std::unique_ptr<Eng3D::OpenGL::Shader>> builtin_shaders;
116 #if defined E3D_TARGET_SWITCH
117 uint64_t application_id = 0x0000000000000000;
Installer(Eng3D::State &s)
std::chrono::system_clock::time_point current_frame_time
int map_movement_axis_num
Number of the axis assigned to map movement.
Eng3D::AudioManager audio_man
void set_multisamples(int samples) const
State(const std::vector< std::string > &pkg_paths)
Eng3D::ModelManager model_man
int map_select_button_num
virtual void handle_key(const Eng3D::Event::Key &e)
virtual void handle_mouse_btn(const Eng3D::Event::MouseButton &e)
void do_run(std::function< bool(void)> cond, std::function< void(void)> event, std::function< void(void)> render)
Perform the main game loop.
Eng3D::MaterialManager material_man
Eng3D::StringManager string_man
std::atomic< bool > run
Variable telling if the game should quit, honored by most event loops but should be used explicitly i...
int zoomin_button_num
Button for zooming in.
static State & get_instance()
Eng3D::Installer installer
Eng3D::TrueType::Manager ttf_man
int cursor_movement_axis_num
Number of the axis assigned to cursor movement.
Eng3D::TextureManager tex_man
virtual void handle_mouse_motion(const Eng3D::Event::MouseMotion &e)
constexpr static auto JOYSTICK_DEAD_ZONE
Value to ignore x/y axis motion taps (useful ignoring stray joystick input)
virtual void handle_mouse_wheel(const Eng3D::Event::MouseWheel &e)
Eng3D::IO::PackageManager package_man
virtual void handle_resize()
The string pool manager (singleton), used mainly for translation purpouses. But also helps to reduce ...
General manager for textures, caches textures into the memory instead of reading them off the disk ev...
The UI context that handles all the ui widgets.