Saxum/game/chunk.hh

21 lines
579 B
C++
Raw Normal View History

2015-03-16 15:58:50 +00:00
#pragma once
#include <ACGL/OpenGL/Objects.hh>
#include "object.hh"
2015-03-16 15:58:50 +00:00
using namespace ACGL::OpenGL;
class Chunk {
public:
Chunk();
~Chunk();
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);
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
};