Merge branch 'sRGB' into master
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user