Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

The renderers always support texture modulation and blend modes.

  • Loading branch information
slouken committed Feb 1, 2011
1 parent e0f33e0 commit 5cc9c02535fa5b7103041b98bc7980f8e7bf0bf7
Showing with 0 additions and 12 deletions.
  1. +0 −12 src/video/SDL_video.c
@@ -2062,10 +2062,6 @@ SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b)
CHECK_TEXTURE_MAGIC(texture, -1);

renderer = texture->renderer;
if (!renderer->SetTextureColorMod) {
SDL_Unsupported();
return -1;
}
if (r < 255 || g < 255 || b < 255) {
texture->modMode |= SDL_TEXTUREMODULATE_COLOR;
} else {
@@ -2110,10 +2106,6 @@ SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha)
CHECK_TEXTURE_MAGIC(texture, -1);

renderer = texture->renderer;
if (!renderer->SetTextureAlphaMod) {
SDL_Unsupported();
return -1;
}
if (alpha < 255) {
texture->modMode |= SDL_TEXTUREMODULATE_ALPHA;
} else {
@@ -2146,10 +2138,6 @@ SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode)
CHECK_TEXTURE_MAGIC(texture, -1);

renderer = texture->renderer;
if (!renderer->SetTextureBlendMode) {
SDL_Unsupported();
return -1;
}
texture->blendMode = blendMode;
if (renderer->SetTextureBlendMode) {
return renderer->SetTextureBlendMode(renderer, texture);

0 comments on commit 5cc9c02

Please sign in to comment.