The renderers always support texture modulation and blend modes.
authorSam Lantinga <slouken@libsdl.org>
Tue, 01 Feb 2011 12:54:27 -0800
changeset 5144a1345acf7b3d
parent 5143 b52793134276
child 5145 2f44e6969a59
The renderers always support texture modulation and blend modes.
src/video/SDL_video.c
     1.1 --- a/src/video/SDL_video.c	Tue Feb 01 12:44:52 2011 -0800
     1.2 +++ b/src/video/SDL_video.c	Tue Feb 01 12:54:27 2011 -0800
     1.3 @@ -2062,10 +2062,6 @@
     1.4      CHECK_TEXTURE_MAGIC(texture, -1);
     1.5  
     1.6      renderer = texture->renderer;
     1.7 -    if (!renderer->SetTextureColorMod) {
     1.8 -        SDL_Unsupported();
     1.9 -        return -1;
    1.10 -    }
    1.11      if (r < 255 || g < 255 || b < 255) {
    1.12          texture->modMode |= SDL_TEXTUREMODULATE_COLOR;
    1.13      } else {
    1.14 @@ -2110,10 +2106,6 @@
    1.15      CHECK_TEXTURE_MAGIC(texture, -1);
    1.16  
    1.17      renderer = texture->renderer;
    1.18 -    if (!renderer->SetTextureAlphaMod) {
    1.19 -        SDL_Unsupported();
    1.20 -        return -1;
    1.21 -    }
    1.22      if (alpha < 255) {
    1.23          texture->modMode |= SDL_TEXTUREMODULATE_ALPHA;
    1.24      } else {
    1.25 @@ -2146,10 +2138,6 @@
    1.26      CHECK_TEXTURE_MAGIC(texture, -1);
    1.27  
    1.28      renderer = texture->renderer;
    1.29 -    if (!renderer->SetTextureBlendMode) {
    1.30 -        SDL_Unsupported();
    1.31 -        return -1;
    1.32 -    }
    1.33      texture->blendMode = blendMode;
    1.34      if (renderer->SetTextureBlendMode) {
    1.35          return renderer->SetTextureBlendMode(renderer, texture);