#include "WorldProgram.hpp"

#include "../Renderer.hpp"

using namespace pass;

WorldProgram::WorldProgram(const WorldProgram::options& opts): VoxelProgram(opts) {

    ModelMatrixID = glGetUniformLocation(ProgramID, "Model");
}

WorldProgram::~WorldProgram() { }

void WorldProgram::setup(glm::mat4 modelMatrix, glm::vec4 sphereProj, float curvature) {
    setModel(&modelMatrix[0][0]);
    VoxelProgram::setup(sphereProj, curvature);
}

void WorldProgram::setModel(const GLfloat *matrix) {
    glUniformMatrix4fv(ModelMatrixID, 1, GL_FALSE, matrix);
}
