Moved rendering code outside of the sandbox update function, renderer instance is now rendering the cube ( although colour is still missing but should be something simple)

This commit is contained in:
2022-10-08 20:40:06 +02:00
parent b03b82272f
commit cbbdafcb3e
7 changed files with 51 additions and 50 deletions

View File

@ -16,6 +16,8 @@
#include "Scene.h"
#include "PerfCounter.h"
extern BarinkEngine::Renderer renderer;
extern void Start();
extern void Update();
extern void ImmediateGraphicsDraw();

View File

@ -3,6 +3,7 @@
#include "Buffer.h"
#include "Mesh.h"
#include "Material.h"
#include <glm/glm.hpp>
namespace BarinkEngine {
@ -17,6 +18,7 @@ namespace BarinkEngine {
GpuBuffer vertexBuffer;
GpuBuffer elementBuffer;
VertexArray vertexarray;
const Mesh* mesh;
const Material* material;