minecraftvulkan/src/first_app.hpp
2022-09-28 00:05:07 -04:00

46 lines
No EOL
883 B
C++
Executable file

#pragma once
#include "xe_engine.hpp"
#include "keyboard_movement_controller.hpp"
#include "simple_renderer.hpp"
#include "chunk.hpp"
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
#include <glm/gtc/constants.hpp>
#include <array>
#include <string>
#include <memory>
#include <vector>
#include <iostream>
namespace app {
class FirstApp {
public:
FirstApp();
~FirstApp();
FirstApp(const FirstApp &) = delete;
FirstApp operator=(const FirstApp &) = delete;
void run();
private:
static constexpr int WIDTH = 800;
static constexpr int HEIGHT = 600;
static constexpr int RENDER_DISTANCE = 10;
void createGameObjects(xe::GameObject& viewer);
void reloadLoadedChunks(xe::GameObject& viewer);
int viewX, viewZ;
xe::Engine xeEngine;
std::vector<xe::GameObject> loadedChunks;
};
}