examples/renderer/01-clear: Use the color-cycle code from testvulkan.c

(and testgpu_simple_clear.c, of course!)
This commit is contained in:
Ryan C. Gordon
2024-09-22 16:10:57 -04:00
parent 3bc2bd790c
commit 1828bde49f
2 changed files with 7 additions and 26 deletions

View File

@@ -91,7 +91,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
color_target_info.texture = swapchainTexture;
color_target_info.clear_color.r = (float)(0.5 + 0.5 * SDL_sin(currentTime));
color_target_info.clear_color.g = (float)(0.5 + 0.5 * SDL_sin(currentTime + SDL_PI_D * 2 / 3));
color_target_info.clear_color.b = (float)(0.5 + 0.5 * SDL_sin(currentTime + SDL_PI_D * 4 / 3));;
color_target_info.clear_color.b = (float)(0.5 + 0.5 * SDL_sin(currentTime + SDL_PI_D * 4 / 3));
color_target_info.clear_color.a = 1.0f;
color_target_info.load_op = SDL_GPU_LOADOP_CLEAR;
color_target_info.store_op = SDL_GPU_STOREOP_STORE;