go back I want to be monkey

This commit is contained in:
Luca Conte 2025-05-15 15:33:51 +02:00
parent dd201108e6
commit 63c44f9f7a
3 changed files with 2035927 additions and 2 deletions

2066
obj/monkey.obj Normal file

File diff suppressed because it is too large Load Diff

2033859
obj/smooth_monkey.obj Normal file

File diff suppressed because it is too large Load Diff

View File

@ -123,7 +123,7 @@ void init(void) {
*/ */
DEBUG("Loading OBJ File"); DEBUG("Loading OBJ File");
ParsedObjFile f = readObjFile("obj/teapot.obj"); ParsedObjFile f = readObjFile("obj/smooth_monkey.obj");
numVertices = f.length * sizeof(face) / sizeof(vertex); numVertices = f.length * sizeof(face) / sizeof(vertex);
DEBUG("Creating vertext buffer"); DEBUG("Creating vertext buffer");
@ -197,7 +197,7 @@ void draw(void) {
mat4 viewMatrix; mat4 viewMatrix;
// mat4Identity(viewMatrix); // mat4Identity(viewMatrix);
vec3 cameraPos = {cos(currentHue * M_PI * 2), 1.0f, sin(currentHue * M_PI * 2)}; vec3 cameraPos = {cos(currentHue * M_PI * 2), 0.0f, sin(currentHue * M_PI * 2)};
vec3 cameraLookAt = {0.0f, 0.2f, 0.0f}; vec3 cameraLookAt = {0.0f, 0.2f, 0.0f};
vec3 cameraUp = {0.0f, 1.0f, 0.0f}; vec3 cameraUp = {0.0f, 1.0f, 0.0f};
mat4BuildLookAt(viewMatrix, cameraPos, cameraLookAt, cameraUp); mat4BuildLookAt(viewMatrix, cameraPos, cameraLookAt, cameraUp);