Multiple changes to prepare for the basic render engine.
* Rendering 2 cubes * per cube transform panels * Updated TODO.md * Updated README.md
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
#include "Input/InputManager.h"
|
||||
#include "Graphics/Renderer.h"
|
||||
#include "Graphics/GUI/GUIManager.h"
|
||||
#include "Scene.h"
|
||||
|
||||
void WARN(std::string message);
|
||||
|
||||
|
@ -1,26 +1,18 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "Mesh.h"
|
||||
#include "Transform.h"
|
||||
#include "Buffer.h"
|
||||
#include "VertexArray.h"
|
||||
#include "Scene.h"
|
||||
|
||||
/*
|
||||
#include <MyGraphicsEngine/AssetManager/ModelImporter.h>
|
||||
#include <MyGraphicsEngine/MyGraphicsEngine/Buffer.h>
|
||||
#include <MyGraphicsEngine/MyGraphicsEngine/VertexArray.h>
|
||||
|
||||
*/
|
||||
|
||||
class Renderable {
|
||||
class Renderable : public SceneNode {
|
||||
public:
|
||||
Buffer vertexBuffer;
|
||||
Buffer elementBuffer;
|
||||
VertexArray VAO;
|
||||
Transform transform;
|
||||
~Renderable();
|
||||
|
||||
static Renderable Load();
|
||||
static Renderable* Load();
|
||||
void Draw();
|
||||
|
||||
private:
|
||||
|
@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
struct Transform {
|
||||
glm::vec3 Position;
|
||||
glm::vec3 Rotation;
|
||||
glm::vec3 Scale;
|
||||
};
|
47
BarinkEngine/Include/Scene.h
Normal file
47
BarinkEngine/Include/Scene.h
Normal file
@ -0,0 +1,47 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "glm/glm.hpp"
|
||||
|
||||
/*
|
||||
* Scene should be a description of a game world
|
||||
*/
|
||||
|
||||
struct Transform {
|
||||
glm::vec3 Position;
|
||||
glm::vec3 Rotation;
|
||||
glm::vec3 Scale;
|
||||
|
||||
glm::mat4 ModelMatrix;
|
||||
};
|
||||
|
||||
|
||||
class SceneNode {
|
||||
public:
|
||||
std::string name;
|
||||
Transform transform;
|
||||
SceneNode* parent;
|
||||
std::vector<SceneNode*> children;
|
||||
|
||||
|
||||
void addChild(SceneNode& node);
|
||||
|
||||
};
|
||||
|
||||
|
||||
class Scene {
|
||||
|
||||
public:
|
||||
SceneNode& GetSceneNode(std::string);
|
||||
SceneNode& GetRoot();
|
||||
|
||||
Scene(std::string SceneName = "Default Scene");
|
||||
~Scene();
|
||||
|
||||
|
||||
private:
|
||||
SceneNode* root;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user