examples now using SDL_ALPHA_OPAQUE(_FLOAT) for opaque alpha value

This commit is contained in:
Michael Palomas 2024-10-23 13:44:28 +02:00 committed by Sam Lantinga
parent 63ef5a2369
commit 21c91d5535
19 changed files with 38 additions and 38 deletions

View file

@ -49,7 +49,7 @@ SDL_AppResult SDL_AppIterate(void *appstate)
const float red = (float) (0.5 + 0.5 * SDL_sin(now));
const float green = (float) (0.5 + 0.5 * SDL_sin(now + SDL_PI_D * 2 / 3));
const float blue = (float) (0.5 + 0.5 * SDL_sin(now + SDL_PI_D * 4 / 3));
SDL_SetRenderDrawColorFloat(renderer, red, green, blue, 1.0f); /* new color, full alpha. */
SDL_SetRenderDrawColorFloat(renderer, red, green, blue, SDL_ALPHA_OPAQUE_FLOAT); /* new color, full alpha. */
/* clear the window to the draw color. */
SDL_RenderClear(renderer);