Nigel Barink
16b61986a1
* Added Texures to the two sample cubes * Modified mesh structure - mesh now contains indices and vertices - Vertices contain vertices and uv's (later on they will also contain normals) Solution definitely not perfect and needs improvement.
37 lines
569 B
C++
37 lines
569 B
C++
#pragma once
|
|
#include <vector>
|
|
#include "Mesh.h"
|
|
#include "Buffer.h"
|
|
#include "Material.h"
|
|
#include "Texture.h"
|
|
#include "VertexArray.h"
|
|
#include "Scene.h"
|
|
|
|
|
|
class Renderable : public SceneNode {
|
|
public:
|
|
/*
|
|
* NOTE: Should combine into a Mesh!!
|
|
*/
|
|
Buffer vertexBuffer;
|
|
Buffer elementBuffer;
|
|
//Buffer uv;
|
|
VertexArray VAO;
|
|
|
|
|
|
GLuint UV_id;
|
|
Material* material;
|
|
Texture* texture;
|
|
|
|
|
|
Shader* shader;
|
|
|
|
~Renderable();
|
|
|
|
static Renderable* Load();
|
|
void Draw();
|
|
|
|
private:
|
|
std::vector<BarinkEngine::Mesh> meshes;
|
|
Renderable();
|
|
}; |