MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / SDL_SetTextureAlphaMod

Function SDL_SetTextureAlphaMod

lib/sdl2/src/render/SDL_render.c:1345–1360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1343}
1344
1345int
1346SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha)
1347{
1348 CHECK_TEXTURE_MAGIC(texture, -1);
1349
1350 if (alpha < 255) {
1351 texture->modMode |= SDL_TEXTUREMODULATE_ALPHA;
1352 } else {
1353 texture->modMode &= ~SDL_TEXTUREMODULATE_ALPHA;
1354 }
1355 texture->a = alpha;
1356 if (texture->native) {
1357 return SDL_SetTextureAlphaMod(texture->native, alpha);
1358 }
1359 return 0;
1360}
1361
1362int
1363SDL_GetTextureAlphaMod(SDL_Texture * texture, Uint8 * alpha)

Callers 7

MoveSpritesFunction · 0.85
WatchJoystickFunction · 0.85
render_testBlitAlphaFunction · 0.85
render_testBlitBlendFunction · 0.85
_hasTexAlphaFunction · 0.85
SDLTest_DrawCharacterFunction · 0.85

Calls

no outgoing calls

Tested by 6

MoveSpritesFunction · 0.68
WatchJoystickFunction · 0.68
render_testBlitAlphaFunction · 0.68
render_testBlitBlendFunction · 0.68
_hasTexAlphaFunction · 0.68
SDLTest_DrawCharacterFunction · 0.68