diff options
| author | Connor Thomson <blumatrikz@gmail.com> | 2026-09-12 10:20:39 -0700 |
|---|---|---|
| committer | Connor Thomson <blumatrikz@gmail.com> | 2026-09-12 10:21:30 -0700 |
| commit | 8fc46365d6bdcde0c18a8b413b9f7a80fa487107 (patch) | |
| tree | 529671bf966ed68c42fbdb9f6e2e1c39d570241d /src/teapot.c | |
| parent | bb5bcab8b854ecfe8b3cc9cce230136c50150fbd (diff) | |
Getting ready to add PCSS shadows
Diffstat (limited to 'src/teapot.c')
| -rw-r--r-- | src/teapot.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/teapot.c b/src/teapot.c index 916406f..3d9cb6d 100644 --- a/src/teapot.c +++ b/src/teapot.c @@ -20,10 +20,11 @@ #include "model.h" #include "teapot.h" #include "models/teapot_data.h" +#include "models/floor_data.h" #include "window.h" static ta_model ta_teapot_model; -static ta_model ta_dounut_model; +static ta_model ta_floor_model; void ta_teapot_init(void) { ta_model_init( @@ -37,17 +38,31 @@ void ta_teapot_init(void) { SDL_GPU_TEXTUREFORMAT_D32_FLOAT, ta_gpu_sample_count ); + ta_model_init( + &ta_floor_model, + ta_gpu_device, + ta_floor_positions, + ta_floor_position_count, + ta_floor_faces, + ta_floor_face_count, + ta_gpu_swapchain_format, + SDL_GPU_TEXTUREFORMAT_D32_FLOAT, + ta_gpu_sample_count + ); + ta_floor_model.position[1] = -0.7f; } void ta_teapot_upload(SDL_GPUCommandBuffer *command_buffer) { ta_model_upload(&ta_teapot_model, command_buffer, ta_gpu_device); - ta_model_upload(&ta_dounut_model, command_buffer, ta_gpu_device); + ta_model_upload(&ta_floor_model, command_buffer, ta_gpu_device); } void ta_teapot_render(SDL_GPUCommandBuffer *command_buffer, SDL_GPURenderPass *render_pass) { ta_model_render(&ta_teapot_model, command_buffer, render_pass, ta_window_width, ta_window_height); + ta_model_render(&ta_floor_model, command_buffer, render_pass, ta_window_width, ta_window_height); } void ta_teapot_shutdown(void) { ta_model_destroy(&ta_teapot_model, ta_gpu_device); -} + ta_model_destroy(&ta_floor_model, ta_gpu_device); +}
\ No newline at end of file |