modified scene system
This commit is contained in:
@@ -250,20 +250,17 @@ void loop() {
|
||||
// draw the stuff
|
||||
if (shader && activeModel) {
|
||||
shader->bind();
|
||||
|
||||
shader->setMat4("projection", gCamera.projection());
|
||||
shader->setMat4("view", gCamera.view());
|
||||
shader->setMat4("model", model);
|
||||
|
||||
shader->setVec3("viewPosition", gCamera.position());
|
||||
|
||||
shader->setVec3("lightPosition", glm::vec3{-2.f, 0, 2.0f});
|
||||
shader->setVec3("lightDirection", glm::vec3(1, -1, 1));
|
||||
shader->setVec3("lightAmbient", glm::vec3(0.3f, 0.3f, 0.3f));
|
||||
shader->setVec3("lightDiffuse", glm::vec3(0.5f, 0.5f, 0.5f));
|
||||
shader->setVec3("lightSpecular", glm::vec3(1.0f, 1.0f, 1.0f));
|
||||
|
||||
for (const auto& mesh: activeModel->meshes) {
|
||||
/*for (const auto& mesh: activeModel->meshes) {
|
||||
unsigned int materialId = 0;
|
||||
if (materialId >= activeModel->materials.size()) {
|
||||
materialId = 0;
|
||||
@@ -294,7 +291,7 @@ void loop() {
|
||||
|
||||
glBindVertexArray(mesh.get()->vao);
|
||||
glDrawElements(GL_TRIANGLES, mesh->numIndices, GL_UNSIGNED_INT, 0);
|
||||
}
|
||||
}*/
|
||||
|
||||
glBindVertexArray(0);
|
||||
ShaderProgram::unbind();
|
||||
|
||||
Reference in New Issue
Block a user