Merge branch 'sRGB' into master

This commit is contained in:
2020-10-10 19:51:34 +02:00
32 changed files with 766 additions and 99 deletions

View File

@@ -32,6 +32,33 @@ void Entity::draw(glm::mat4 viewProjMatrix, glm::vec3 viewPosition) {
}
void Entity::drawDirectionalShadows(glm::mat4 viewProjMatrix, ShaderProgram *p_shaderProgram) {
p_shaderProgram->bind();
glm::mat4 modelViewProj = viewProjMatrix * modelMatrix;
shaderProgram->setUniform("u_modelViewProjMatrix", modelViewProj);
// Draw the model
model->drawWithoutTextures();
p_shaderProgram->unbind();
}
void Entity::drawPointShadows(ShaderProgram *p_shaderProgram) {
p_shaderProgram->bind();
p_shaderProgram->setUniform("u_modelMatrix", modelMatrix);
// Draw the model
model->drawWithoutTextures();
p_shaderProgram->unbind();
}
void Entity::translate(glm::vec3 vector) {
position += vector;
updateModelMatrix();