2015-03-16 15:58:50 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <ACGL/OpenGL/Objects.hh>
|
2015-03-20 22:45:28 +00:00
|
|
|
#include "object.hh"
|
2015-03-16 15:58:50 +00:00
|
|
|
|
|
|
|
using namespace ACGL::OpenGL;
|
|
|
|
|
|
|
|
class Chunk {
|
|
|
|
public:
|
|
|
|
Chunk();
|
|
|
|
~Chunk();
|
2015-04-12 19:06:59 +00:00
|
|
|
void render(SharedShaderProgram shader, bool lightingPass,
|
2015-03-16 15:58:50 +00:00
|
|
|
glm::mat4* viewProjcetionMatrix, std::vector<glm::mat4>* additionalMatrices=0);
|
|
|
|
void addObject(Object* object);
|
2015-03-21 17:44:08 +00:00
|
|
|
void sortObjects(int textureCount);
|
2015-03-21 14:05:22 +00:00
|
|
|
std::vector<std::vector<Object*>>* getSortedObjects();
|
2015-03-16 15:58:50 +00:00
|
|
|
private:
|
|
|
|
std::vector<Object*> objects;
|
2015-03-21 14:05:22 +00:00
|
|
|
std::vector<std::vector<Object*>> sortedObjects;
|
2015-03-16 15:58:50 +00:00
|
|
|
};
|