mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-04-10 06:14:07 +08:00
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <Cubed/camera.hpp>
|
|
#include <Cubed/gameplay/world.hpp>
|
|
#include <Cubed/input.hpp>
|
|
#include <Cubed/renderer.hpp>
|
|
#include <Cubed/texture_manager.hpp>
|
|
#include <Cubed/window.hpp>
|
|
|
|
class App {
|
|
public:
|
|
App();
|
|
~App();
|
|
static void cursor_position_callback(GLFWwindow* window, double xpos, double ypos);
|
|
static void key_callback(GLFWwindow* window, int key, int scancode, int action, int mods);
|
|
static void mouse_button_callback(GLFWwindow* window, int button, int action, int mods);
|
|
static void window_focus_callback(GLFWwindow* window, int focused);
|
|
static void window_reshape_callback(GLFWwindow* window, int new_width, int new_height);
|
|
static int start_cubed_application(int argc, char** argv);
|
|
|
|
|
|
private:
|
|
Camera m_camera;
|
|
TextureManager m_texture_manager;
|
|
World m_world;
|
|
Renderer m_renderer{m_camera, m_world, m_texture_manager};
|
|
|
|
Window m_window{m_renderer};
|
|
|
|
|
|
GLuint m_texture_array;
|
|
|
|
|
|
|
|
|
|
void init();
|
|
|
|
auto init_camera();
|
|
auto init_texture();
|
|
auto init_world();
|
|
|
|
void render();
|
|
void run();
|
|
void update();
|
|
}; |