added a croissant model

This commit is contained in:
Lukian 2025-02-05 11:10:29 +01:00
parent 1278395851
commit 32fd486cc3
6 changed files with 1324 additions and 4 deletions

View file

@ -10,6 +10,7 @@
#include <string>
#include <vector>
#include <iostream>
using namespace std;
#define MAX_BONE_INFLUENCE 4

View file

@ -0,0 +1,12 @@
# Blender 4.3.2 MTL File: 'None'
# www.blender.org
newmtl Material.001
Ns 250.000000
Ka 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.500000
d 1.000000
illum 2
map_Kd ../textures/Texture.jpg

File diff suppressed because it is too large Load diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View file

@ -59,10 +59,10 @@ int main()
glEnable(GL_DEPTH_TEST);
stbi_set_flip_vertically_on_load(true);
//stbi_set_flip_vertically_on_load(true);
Shader ourShader("resources/shaders/shader.vs", "resources/shaders/shader.fs");
Model ourModel("resources/models/backpack/backpack.obj");
Model croissant("resources/models/croissant/source/croissant.obj");
glm::mat4 model = glm::mat4(1.0f);
model = glm::rotate(model, glm::radians(-55.0f), glm::vec3(1.0f, 0.0f, 0.0f));
@ -85,11 +85,11 @@ int main()
ourShader.setMat4("view", view);
ourShader.setMat4("projection", projection);
glm::mat4 model = glm::mat4(1.0f);
model = glm::mat4(1.0f);
model = glm::translate(model, glm::vec3(0.0f, 0.0f, 0.0f));
model = glm::scale(model, glm::vec3(1.0f, 1.0f, 1.0f));
ourShader.setMat4("model", model);
ourModel.Draw(ourShader);
croissant.Draw(ourShader);
glfwSwapBuffers(window);
glfwPollEvents();