MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / SDL_SetTextureColorMod

Function SDL_SetTextureColorMod

deps/SDL2/src/render/SDL_render.c:1308–1325  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1306}
1307
1308int
1309SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b)
1310{
1311 CHECK_TEXTURE_MAGIC(texture, -1);
1312
1313 if (r < 255 || g < 255 || b < 255) {
1314 texture->modMode |= SDL_TEXTUREMODULATE_COLOR;
1315 } else {
1316 texture->modMode &= ~SDL_TEXTUREMODULATE_COLOR;
1317 }
1318 texture->r = r;
1319 texture->g = g;
1320 texture->b = b;
1321 if (texture->native) {
1322 return SDL_SetTextureColorMod(texture->native, r, g, b);
1323 }
1324 return 0;
1325}
1326
1327int
1328SDL_GetTextureColorMod(SDL_Texture * texture, Uint8 * r, Uint8 * g,

Callers 9

initializeTextureFunction · 0.85
MoveSpritesFunction · 0.85
WatchGameControllerFunction · 0.85
WatchJoystickFunction · 0.85
render_testBlitColorFunction · 0.85
render_testBlitBlendFunction · 0.85
_hasTexColorFunction · 0.85
SDLTest_DrawCharacterFunction · 0.85

Calls

no outgoing calls

Tested by 7

MoveSpritesFunction · 0.68
WatchGameControllerFunction · 0.68
WatchJoystickFunction · 0.68
render_testBlitColorFunction · 0.68
render_testBlitBlendFunction · 0.68
_hasTexColorFunction · 0.68
SDLTest_DrawCharacterFunction · 0.68