diff options
author | omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> | 2024-04-04 20:54:45 +1100 |
---|---|---|
committer | omnisci3nce <17525998+omnisci3nce@users.noreply.github.com> | 2024-04-04 20:54:45 +1100 |
commit | af97c4330a27a92d2362e30b70990e3aa5c9954a (patch) | |
tree | a21359f3f4e8cc4efe9288288a59e55c6ced5d7d /src | |
parent | bb889d2edc1cc72b939edf47a2e03b7569c1a722 (diff) |
add AnimatedCube
Diffstat (limited to 'src')
-rw-r--r-- | src/defines.h | 4 | ||||
-rw-r--r-- | src/renderer/backends/backend_opengl.c | 6 | ||||
-rw-r--r-- | src/resources/gltf.c | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/src/defines.h b/src/defines.h index 4459e1a..52aa7b0 100644 --- a/src/defines.h +++ b/src/defines.h @@ -66,8 +66,8 @@ Renderer backend defines: // Platform will inform renderer backend (unless user overrides) #if defined(CEL_PLATFORM_LINUX) || defined(CEL_PLATFORM_WINDOWS) -// #define CEL_REND_BACKEND_OPENGL 1 -#define CEL_REND_BACKEND_VULKAN 1 +#define CEL_REND_BACKEND_OPENGL 1 +// #define CEL_REND_BACKEND_VULKAN 1 #endif #if defined(CEL_PLATFORM_MAC) diff --git a/src/renderer/backends/backend_opengl.c b/src/renderer/backends/backend_opengl.c index e3a4fb6..8df0933 100644 --- a/src/renderer/backends/backend_opengl.c +++ b/src/renderer/backends/backend_opengl.c @@ -1,4 +1,5 @@ #include <stdlib.h> +#include "camera.h" #define CEL_PLATFORM_LINUX #include "defines.h" @@ -40,6 +41,11 @@ bool gfx_backend_init(renderer *ren) { return true; } + +void gfx_backend_draw_frame(renderer* ren, camera* cam, mat4 model, texture* tex) { + +} + void gfx_backend_shutdown(renderer *ren) {} void uniform_vec3f(u32 program_id, const char *uniform_name, vec3 *value) { diff --git a/src/resources/gltf.c b/src/resources/gltf.c index b269fcd..261c96f 100644 --- a/src/resources/gltf.c +++ b/src/resources/gltf.c @@ -211,7 +211,8 @@ bool model_load_gltf_str(const char *file_string, const char *filepath, str8 rel if (primitive.material != NULL) { for (int i = 0; i < material_darray_len(out_model->materials); i++) { - if (strcmp(primitive.material->name, out_model->materials->data[i].name)) { + printf("%s vs %s \n", primitive.material->name, out_model->materials->data[i].name); + if (strcmp(primitive.material->name, out_model->materials->data[i].name) == 0) { TRACE("Found material"); mesh.material_index = i; break; |