Reorganising the game engine structure. Getting things ready for real development of the engine

This commit is contained in:
2022-05-27 22:47:36 +02:00
parent 4625ca657b
commit 3446bc2399
22 changed files with 326 additions and 221 deletions

View File

@ -4,11 +4,10 @@
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define TINYGLTF_NO_EXTERNAL_IMAGE
#include <MyGraphicsEngine/Mesh.h>
#include "../MyGraphicsEngine/Mesh.h"
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <spdlog/spdlog.h>
#include <string>
class ModelImporter {

View File

@ -1,6 +1,7 @@
#pragma once
#include <vector>
#include <glm/glm.hpp>
namespace BarinkEngine{
class Mesh {

View File

@ -0,0 +1,30 @@
#pragma once
#include <vector>
#include "Mesh.h"
#include "Transform.h"
#include "Buffer.h"
#include "VertexArray.h"
/*
#include <MyGraphicsEngine/AssetManager/ModelImporter.h>
#include <MyGraphicsEngine/MyGraphicsEngine/Buffer.h>
#include <MyGraphicsEngine/MyGraphicsEngine/VertexArray.h>
*/
class Renderable {
private:
std::vector<BarinkEngine::Mesh> meshes;
Renderable();
public:
Buffer vertexBuffer;
Buffer elementBuffer;
VertexArray VAO;
Transform transform;
~Renderable();
static Renderable Load();
void Draw();
};

View File

@ -1,9 +1,9 @@
#pragma once
#include <glad/glad.h>
#include <string>
#include <iostream>
#include <fstream>
#include <spdlog/spdlog.h>
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>

View File

@ -1,9 +1,13 @@
#pragma once
#include <glad/glad.h>
#define GLFW_STATIC
#include <glad/glad.h>
#include <GLFW/glfw3.h>
class BarinkWindow{
private:
GLFWwindow* window;