diff --git a/cw 9/src/ex_9_1.hpp b/cw 9/src/ex_9_1.hpp index 16148a0..438179a 100644 --- a/cw 9/src/ex_9_1.hpp +++ b/cw 9/src/ex_9_1.hpp @@ -34,6 +34,7 @@ namespace texture { GLuint wall4; GLuint ship; GLuint roof; + GLuint xThing; } namespace models { @@ -612,28 +613,30 @@ void renderScene(GLFWwindow* window) drawObjectPBR(models::vase1Context, glm::mat4(), glm::vec3(0.320f, 0.11f, 0.131f), 0.2f, 0.0f); drawObjectPBR(models::vase2Context, glm::mat4(), glm::vec3(0.4f, 0.2f, 0.1f), 0.2f, 0.0f); - //drawObjectPBR(models::sofaContext, glm::mat4(), glm::vec3(0.620f, 0.313f, 0.131f), 0.2f, 0.0f); drawObjectPBR(models::tvTableContext, glm::mat4(), glm::vec3(0.4f, 0.4f, 0.4f), 0.4f, 0.0f); drawObjectPBR(models::tableContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f); drawObjectPBR(models::doorContext, glm::mat4()/*glm::rotate(glm::mat4(), time * glm::radians(90.0f), glm::vec3(1.0f, 0.0f, 0.0f))*/, glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f); drawObjectPBR(models::doorFrameContext, glm::mat4(), glm::vec3(0.45f, 0.120f, 0.057f), 0.26f, 0.0f); drawObjectPBR(models::drawerContext, glm::mat4(), glm::vec3(0.428691f, 0.08022f, 0.036889f), 0.2f, 0.0f); drawObjectPBR(models::tvContext, glm::mat4(), glm::vec3(1.f, 1.f, 1.f), 0.5f, 1.0f); - drawObjectPBR(models::xThingContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f); + drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f); + //drawObjectPBR(models::sofaContext, glm::mat4(), glm::vec3(0.620f, 0.313f, 0.131f), 0.2f, 0.0f); + //drawObjectPBR(models::xThingContext, glm::mat4(), glm::vec3(0.10039f, 0.018356f, 0.001935f), 0.1f, 0.0f); //drawObjectPBR(models::planeContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f); //drawObjectPBR(models::roomContext, glm::mat4(), glm::vec3(0.9f, 0.9f, 0.9f), 0.8f, 0.0f); - drawObjectPBR(models::windowContext, glm::mat4(), glm::vec3(0.402978f, 0.120509f, 0.057729f), 0.2f, 0.0f); //drawObjectPBR(models::roofContext, glm::mat4(), glm::vec3(0.0f, 0.0f, 0.0f), 0.0f, 0.0f); drawObjectTexture(models::planeContext, glm::mat4(), texture::floor); + drawObjectTexture(models::xThingContext, glm::mat4(), texture::xThing); drawObjectTexture(models::sofaContext, glm::mat4(), texture::sofa); + drawObjectTexture(models::roofContext, glm::mat4(), texture::roof); + drawObjectTexture(models::roomContext, glm::mat4(), texture::wall1); + //drawObjectTexture(models::wall1Context, glm::mat4(), texture::wall1); //drawObjectTexture(models::wall2Context, glm::mat4(), texture::wall2); //drawObjectTexture(models::wall3Context, glm::mat4(), texture::wall3); //drawObjectTexture(models::wall4Context, glm::mat4(), texture::wall4); - drawObjectTexture(models::roofContext, glm::mat4(), texture::roof); - drawObjectTexture(models::roomContext, glm::mat4(), texture::wall1); glm::vec3 spaceshipSide = glm::normalize(glm::cross(spaceShip.getSpaceShipDir(), glm::vec3(0.f, 1.f, 0.f))); @@ -869,6 +872,8 @@ void init(GLFWwindow* window) loadModelToContext("./models/test.obj", models::testContext); texture::sofa = Core::LoadTexture("textures/sofa.jpg"); + texture::xThing = Core::LoadTexture("textures/xThing.png"); + texture::floor = Core::LoadTexture("textures/floor.jpg"); texture::wall1 = Core::LoadTexture("textures/wall.jpg"); texture::wall2 = Core::LoadTexture("textures/wall.jpg"); diff --git a/cw 9/textures/xThing.png b/cw 9/textures/xThing.png new file mode 100644 index 0000000..5dea255 Binary files /dev/null and b/cw 9/textures/xThing.png differ