Implement optimised array rendering

This commit is contained in:
2016-05-25 12:44:24 +02:00
parent fe1aa7220e
commit 84fcc346a9
7 changed files with 101 additions and 45 deletions
+6 -2
View File
@@ -5,11 +5,13 @@
#include <vector>
#include <map>
#include "Vector.h"
#include "Vertex.h"
class Model
{
private:
class Vertex
class VertexIndex
{
public:
int position;
@@ -20,7 +22,7 @@ private:
class Face
{
public:
std::list<Vertex> vertices;
std::list<VertexIndex> vertices;
};
class Texture
@@ -54,6 +56,7 @@ private:
std::string name;
int materialIndex;
std::list<Face> faces;
std::vector<Vertex> VertexArray;
};
std::vector<Vec3f> vertices;
@@ -74,6 +77,7 @@ public:
static void unload(Model* model);
void draw();
void Optimise(ObjGroup *t);
Vec3f minVertex;
Vec3f maxVertex;