Added some objects
This commit is contained in:
parent
4122c2a302
commit
b72f14a8f6
12
models2/door/source/door.mtl
Normal file
12
models2/door/source/door.mtl
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# Blender 3.4.1 MTL File: 'None'
|
||||||
|
# www.blender.org
|
||||||
|
|
||||||
|
newmtl Door
|
||||||
|
Ns 250.000000
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.800000 0.800000 0.800000
|
||||||
|
Ks 0.500000 0.500000 0.500000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.450000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
1698
models2/door/source/door.obj
Normal file
1698
models2/door/source/door.obj
Normal file
File diff suppressed because it is too large
Load Diff
BIN
models2/door/textures/Door_albedo.bmp
Normal file
BIN
models2/door/textures/Door_albedo.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 MiB |
BIN
models2/potplant/b3.bmp
Normal file
BIN
models2/potplant/b3.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 MiB |
@ -169,7 +169,7 @@ void drawObjectPBR(Core::RenderContext& context, glm::mat4 modelMatrix, GLuint t
|
|||||||
glm::mat4 lightVP = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
glm::mat4 lightVP = glm::ortho(-3.f, 2.3f, -1.3f, 3.f, -1.0f, 40.0f) * glm::lookAt(sunPos, sunPos - sunDir, glm::vec3(0, 1, 0));
|
||||||
glUniformMatrix4fv(glGetUniformLocation(program, "LightVP"), 1, GL_FALSE, (float*)&lightVP);
|
glUniformMatrix4fv(glGetUniformLocation(program, "LightVP"), 1, GL_FALSE, (float*)&lightVP);
|
||||||
|
|
||||||
Core::SetActiveTexture(texture, "colorTexture", program, 0);
|
Core::SetActiveTexture(texture, "colorTexture", program, texture);
|
||||||
|
|
||||||
Core::DrawContext(context);
|
Core::DrawContext(context);
|
||||||
|
|
||||||
@ -264,9 +264,9 @@ void renderScene(GLFWwindow* window)
|
|||||||
0.2,
|
0.2,
|
||||||
0.1
|
0.1
|
||||||
);
|
);
|
||||||
drawObjectPBR(models::potPlant, glm::mat4(),
|
drawObjectPBR(models::potPlant, glm::mat4() * glm::scale(glm::vec3(0.2f)) * glm::translate(glm::vec3(-5.0f, 55.0f, -6.0f)),
|
||||||
textures::potPlantTexture,
|
textures::potPlantTexture,
|
||||||
0.3f,
|
1.0f,
|
||||||
0.2f
|
0.2f
|
||||||
);
|
);
|
||||||
drawObjectPBR(models::officeChair, glm::mat4(),
|
drawObjectPBR(models::officeChair, glm::mat4(),
|
||||||
@ -274,7 +274,7 @@ void renderScene(GLFWwindow* window)
|
|||||||
0.2f,
|
0.2f,
|
||||||
0.0f
|
0.0f
|
||||||
);
|
);
|
||||||
drawObjectPBR(models::lamp, glm::mat4(),
|
drawObjectPBR(models::lamp, glm::mat4() * glm::scale(glm::vec3(0.001f)),
|
||||||
textures::lampTexture,
|
textures::lampTexture,
|
||||||
0.3f,
|
0.3f,
|
||||||
0.0f
|
0.0f
|
||||||
@ -393,10 +393,16 @@ void init(GLFWwindow* window)
|
|||||||
|
|
||||||
loadModelToContext("./models2/Frame/Frame.obj", models::windowFrame);
|
loadModelToContext("./models2/Frame/Frame.obj", models::windowFrame);
|
||||||
loadModelToContext("./models2/bookshelf/shelf.obj", models::bookShelf);
|
loadModelToContext("./models2/bookshelf/shelf.obj", models::bookShelf);
|
||||||
|
loadModelToContext("./models2/potplant/Pot.obj", models::potPlant);
|
||||||
|
loadModelToContext("./models2/lamp/Lamp_LOVMANAD_OBJ.obj", models::lamp);
|
||||||
|
loadModelToContext("./models2/door/source/door.obj", models::door);
|
||||||
|
|
||||||
textures::sunTexture = Core::LoadTexture("./models/sun.jpeg");
|
textures::sunTexture = Core::LoadTexture("./models/sun.jpeg");
|
||||||
textures::windowFrameTexture = Core::LoadTexture("./models2/Frame/frame.png");
|
textures::windowFrameTexture = Core::LoadTexture("./models2/Frame/frame.png");
|
||||||
textures::bookShelfTexture = Core::LoadTexture("./models2/bookshelf/SHELF_TEXTURE.bmp");
|
textures::bookShelfTexture = Core::LoadTexture("./models2/bookshelf/SHELF_TEXTURE.bmp");
|
||||||
|
textures::potPlantTexture = Core::LoadTexture("./models2/potplant/b3.bmp");
|
||||||
|
textures::lampTexture = Core::LoadTexture("./models2/lamp/_Base_color.png");
|
||||||
|
textures::doorTexture = Core::LoadTexture("./models2/door/textures/Door_albedo.bmp");
|
||||||
}
|
}
|
||||||
|
|
||||||
void shutdown(GLFWwindow* window)
|
void shutdown(GLFWwindow* window)
|
||||||
|
Loading…
Reference in New Issue
Block a user