Window in place

This commit is contained in:
Aleksander Burkowski 2023-01-31 14:52:41 +01:00
parent 0794ab0449
commit cc0c23c175

View File

@ -365,56 +365,56 @@ void renderScene(GLFWwindow* window)
0,
0
);
model = glm::mat4() * glm::translate(glm::vec3(-2.5, 1.5, -0.5)) * glm::scale(glm::vec3(0.4));
model = glm::mat4() * glm::translate(glm::vec3(-2.5, 0.99, -0.75)) * glm::scale(glm::vec3(0.36,0.34,0.36));
model = glm::rotate(model, glm::radians(90.0f), glm::vec3(0, 1, 0));
drawObjectPBR(models::window, model,
textures::windowFrameTexture,
0.2,
0.1
);
drawObjectPBR(models::potPlant, glm::mat4() * glm::scale(glm::vec3(0.2f)) * glm::translate(glm::vec3(-5.0f, 55.0f, -6.0f)),
textures::potPlantTexture,
1.0f,
0.2f
);
drawObjectPBR(models::officeChair, glm::mat4(),
textures::officeChariTexture,
0.2f,
0.0f
);
drawObjectPBR(models::lamp, glm::mat4() * glm::scale(glm::vec3(0.001f)),
textures::lampTexture,
0.3f,
0.0f
);
drawObjectPBR(models::door, glm::mat4(),
textures::doorTexture,
0.4f,
0.0f
);
drawObjectPBR(models::desk, glm::mat4(),
textures::deskTexture,
0.4f,
0.0f
);
drawObjectPBR(models::ceilingLamp, glm::mat4(),
textures::ceilingLampTexture,
0.2f,
0.0f
);
drawObjectPBR(models::bed, glm::mat4(),
textures::bedTexture,
0.3f,
0.0f
);
drawObjectPBR(models::windowFrame, glm::mat4(),
textures::windowFrameTexture,
0.2f,
0.0f);
drawObjectPBR(models::bookShelf, glm::mat4() * glm::scale(glm::vec3(0.01)),
textures::bookShelfTexture,
0.4f,
0.1f);
//drawObjectPBR(models::potPlant, glm::mat4() * glm::scale(glm::vec3(0.2f)) * glm::translate(glm::vec3(-5.0f, 55.0f, -6.0f)),
// textures::potPlantTexture,
// 1.0f,
// 0.2f
//);
//drawObjectPBR(models::officeChair, glm::mat4(),
// textures::officeChariTexture,
// 0.2f,
// 0.0f
//);
//drawObjectPBR(models::lamp, glm::mat4() * glm::scale(glm::vec3(0.001f)),
// textures::lampTexture,
// 0.3f,
// 0.0f
//);
//drawObjectPBR(models::door, glm::mat4(),
// textures::doorTexture,
// 0.4f,
// 0.0f
//);
//drawObjectPBR(models::desk, glm::mat4(),
// textures::deskTexture,
// 0.4f,
// 0.0f
//);
//drawObjectPBR(models::ceilingLamp, glm::mat4(),
// textures::ceilingLampTexture,
// 0.2f,
// 0.0f
//);
//drawObjectPBR(models::bed, glm::mat4(),
// textures::bedTexture,
// 0.3f,
// 0.0f
//);
//drawObjectPBR(models::windowFrame, glm::mat4(),
// textures::windowFrameTexture,
// 0.2f,
// 0.0f);
//drawObjectPBR(models::bookShelf, glm::mat4() * glm::scale(glm::vec3(0.01)),
// textures::bookShelfTexture,
// 0.4f,
// 0.1f);
glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceshipDir, glm::vec3(0.f, 1.f, 0.f)));
glm::vec3 spaceshipUp = glm::normalize(glm::cross(spaceshipSide, spaceshipDir));