Making the API simpler, texture color and alpha modulation are supported by all renderers.
authorSam Lantinga <slouken@libsdl.org>
Mon, 31 Jan 2011 23:37:30 -0800
changeset 514131e7f523ab3d
parent 5140 e743b9c3f6d6
child 5142 c8e049de174c
Making the API simpler, texture color and alpha modulation are supported by all renderers.
include/SDL_video.h
src/video/SDL_renderer_gl.c
src/video/SDL_renderer_gles.c
src/video/SDL_renderer_sw.c
src/video/SDL_sysvideo.h
src/video/SDL_video.c
src/video/directfb/SDL_DirectFB_render.c
src/video/nds/SDL_ndsrender.c
src/video/photon/SDL_photon_render.c
src/video/qnxgf/SDL_gf_render.c
src/video/windows/SDL_d3drender.c
     1.1 --- a/include/SDL_video.h	Mon Jan 31 23:23:57 2011 -0800
     1.2 +++ b/include/SDL_video.h	Mon Jan 31 23:37:30 2011 -0800
     1.3 @@ -186,7 +186,6 @@
     1.4  {
     1.5      const char *name;           /**< The name of the renderer */
     1.6      Uint32 flags;               /**< Supported ::SDL_RendererFlags */
     1.7 -    Uint32 mod_modes;           /**< A mask of supported channel modulation */
     1.8      Uint32 num_texture_formats; /**< The number of available texture formats */
     1.9      Uint32 texture_formats[50]; /**< The available texture formats */
    1.10      int max_texture_width;      /**< The maximimum texture width */
     2.1 --- a/src/video/SDL_renderer_gl.c	Mon Jan 31 23:23:57 2011 -0800
     2.2 +++ b/src/video/SDL_renderer_gl.c	Mon Jan 31 23:37:30 2011 -0800
     2.3 @@ -79,10 +79,6 @@
     2.4  static int GL_GetTexturePalette(SDL_Renderer * renderer,
     2.5                                  SDL_Texture * texture, SDL_Color * colors,
     2.6                                  int firstcolor, int ncolors);
     2.7 -static int GL_SetTextureColorMod(SDL_Renderer * renderer,
     2.8 -                                 SDL_Texture * texture);
     2.9 -static int GL_SetTextureAlphaMod(SDL_Renderer * renderer,
    2.10 -                                 SDL_Texture * texture);
    2.11  static int GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    2.12                              const SDL_Rect * rect, const void *pixels,
    2.13                              int pitch);
    2.14 @@ -118,8 +114,6 @@
    2.15       "opengl",
    2.16       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD |
    2.17        SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED),
    2.18 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
    2.19 -      SDL_TEXTUREMODULATE_ALPHA),
    2.20       15,
    2.21       {
    2.22        SDL_PIXELFORMAT_INDEX1LSB,
    2.23 @@ -291,8 +285,6 @@
    2.24      renderer->QueryTexturePixels = GL_QueryTexturePixels;
    2.25      renderer->SetTexturePalette = GL_SetTexturePalette;
    2.26      renderer->GetTexturePalette = GL_GetTexturePalette;
    2.27 -    renderer->SetTextureColorMod = GL_SetTextureColorMod;
    2.28 -    renderer->SetTextureAlphaMod = GL_SetTextureAlphaMod;
    2.29      renderer->UpdateTexture = GL_UpdateTexture;
    2.30      renderer->LockTexture = GL_LockTexture;
    2.31      renderer->UnlockTexture = GL_UnlockTexture;
    2.32 @@ -948,18 +940,6 @@
    2.33  }
    2.34  
    2.35  static int
    2.36 -GL_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
    2.37 -{
    2.38 -    return 0;
    2.39 -}
    2.40 -
    2.41 -static int
    2.42 -GL_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
    2.43 -{
    2.44 -    return 0;
    2.45 -}
    2.46 -
    2.47 -static int
    2.48  GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    2.49                   const SDL_Rect * rect, const void *pixels, int pitch)
    2.50  {
     3.1 --- a/src/video/SDL_renderer_gles.c	Mon Jan 31 23:23:57 2011 -0800
     3.2 +++ b/src/video/SDL_renderer_gles.c	Mon Jan 31 23:37:30 2011 -0800
     3.3 @@ -67,10 +67,6 @@
     3.4  static int GLES_GetTexturePalette(SDL_Renderer * renderer,
     3.5                                    SDL_Texture * texture, SDL_Color * colors,
     3.6                                    int firstcolor, int ncolors);
     3.7 -static int GLES_SetTextureColorMod(SDL_Renderer * renderer,
     3.8 -                                   SDL_Texture * texture);
     3.9 -static int GLES_SetTextureAlphaMod(SDL_Renderer * renderer,
    3.10 -                                   SDL_Texture * texture);
    3.11  static int GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    3.12                                const SDL_Rect * rect, const void *pixels,
    3.13                                int pitch);
    3.14 @@ -104,8 +100,6 @@
    3.15       "opengl_es",
    3.16       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTDISCARD |
    3.17        SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_ACCELERATED),
    3.18 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
    3.19 -      SDL_TEXTUREMODULATE_ALPHA),
    3.20       {
    3.21        /* OpenGL ES 1.x supported formats list */
    3.22        SDL_PIXELFORMAT_RGBA4444,
    3.23 @@ -231,8 +225,6 @@
    3.24      renderer->QueryTexturePixels = GLES_QueryTexturePixels;
    3.25      renderer->SetTexturePalette = GLES_SetTexturePalette;
    3.26      renderer->GetTexturePalette = GLES_GetTexturePalette;
    3.27 -    renderer->SetTextureColorMod = GLES_SetTextureColorMod;
    3.28 -    renderer->SetTextureAlphaMod = GLES_SetTextureAlphaMod;
    3.29      renderer->UpdateTexture = GLES_UpdateTexture;
    3.30      renderer->LockTexture = GLES_LockTexture;
    3.31      renderer->UnlockTexture = GLES_UnlockTexture;
    3.32 @@ -497,18 +489,6 @@
    3.33  }
    3.34  
    3.35  static int
    3.36 -GLES_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
    3.37 -{
    3.38 -    return 0;
    3.39 -}
    3.40 -
    3.41 -static int
    3.42 -GLES_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
    3.43 -{
    3.44 -    return 0;
    3.45 -}
    3.46 -
    3.47 -static int
    3.48  GLES_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    3.49                     const SDL_Rect * rect, const void *pixels, int pitch)
    3.50  {
     4.1 --- a/src/video/SDL_renderer_sw.c	Mon Jan 31 23:23:57 2011 -0800
     4.2 +++ b/src/video/SDL_renderer_sw.c	Mon Jan 31 23:37:30 2011 -0800
     4.3 @@ -49,6 +49,8 @@
     4.4                                   SDL_Texture * texture);
     4.5  static int SW_SetTextureAlphaMod(SDL_Renderer * renderer,
     4.6                                   SDL_Texture * texture);
     4.7 +static int SW_SetTextureBlendMode(SDL_Renderer * renderer,
     4.8 +                                  SDL_Texture * texture);
     4.9  static int SW_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    4.10                              const SDL_Rect * rect, const void *pixels,
    4.11                              int pitch);
    4.12 @@ -82,8 +84,6 @@
    4.13       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_PRESENTCOPY |
    4.14        SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
    4.15        SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC),
    4.16 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
    4.17 -      SDL_TEXTUREMODULATE_ALPHA),
    4.18       14,
    4.19       {
    4.20        SDL_PIXELFORMAT_INDEX8,
    4.21 @@ -172,12 +172,12 @@
    4.22      renderer->GetTexturePalette = SW_GetTexturePalette;
    4.23      renderer->SetTextureColorMod = SW_SetTextureColorMod;
    4.24      renderer->SetTextureAlphaMod = SW_SetTextureAlphaMod;
    4.25 +    renderer->SetTextureBlendMode = SW_SetTextureBlendMode;
    4.26      renderer->UpdateTexture = SW_UpdateTexture;
    4.27      renderer->LockTexture = SW_LockTexture;
    4.28      renderer->UnlockTexture = SW_UnlockTexture;
    4.29      renderer->DestroyTexture = SW_DestroyTexture;
    4.30  
    4.31 -    renderer->info.mod_modes = SW_RenderDriver.info.mod_modes;
    4.32      renderer->info.num_texture_formats =
    4.33          SW_RenderDriver.info.num_texture_formats;
    4.34      SDL_memcpy(renderer->info.texture_formats,
     5.1 --- a/src/video/SDL_sysvideo.h	Mon Jan 31 23:23:57 2011 -0800
     5.2 +++ b/src/video/SDL_sysvideo.h	Mon Jan 31 23:37:30 2011 -0800
     5.3 @@ -86,8 +86,6 @@
     5.4      void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
     5.5      void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
     5.6                            int numrects, const SDL_Rect * rects);
     5.7 -    int (*SetDrawColor) (SDL_Renderer * renderer);
     5.8 -    int (*SetDrawBlendMode) (SDL_Renderer * renderer);
     5.9      int (*RenderClear) (SDL_Renderer * renderer);
    5.10      int (*RenderDrawPoints) (SDL_Renderer * renderer, const SDL_Point * points,
    5.11                               int count);
     6.1 --- a/src/video/SDL_video.c	Mon Jan 31 23:23:57 2011 -0800
     6.2 +++ b/src/video/SDL_video.c	Mon Jan 31 23:37:30 2011 -0800
     6.3 @@ -2074,7 +2074,11 @@
     6.4      texture->r = r;
     6.5      texture->g = g;
     6.6      texture->b = b;
     6.7 -    return renderer->SetTextureColorMod(renderer, texture);
     6.8 +    if (renderer->SetTextureColorMod) {
     6.9 +        return renderer->SetTextureColorMod(renderer, texture);
    6.10 +    } else {
    6.11 +        return 0;
    6.12 +    }
    6.13  }
    6.14  
    6.15  int
    6.16 @@ -2116,7 +2120,11 @@
    6.17          texture->modMode &= ~SDL_TEXTUREMODULATE_ALPHA;
    6.18      }
    6.19      texture->a = alpha;
    6.20 -    return renderer->SetTextureAlphaMod(renderer, texture);
    6.21 +    if (renderer->SetTextureAlphaMod) {
    6.22 +        return renderer->SetTextureAlphaMod(renderer, texture);
    6.23 +    } else {
    6.24 +        return 0;
    6.25 +    }
    6.26  }
    6.27  
    6.28  int
    6.29 @@ -2143,7 +2151,11 @@
    6.30          return -1;
    6.31      }
    6.32      texture->blendMode = blendMode;
    6.33 -    return renderer->SetTextureBlendMode(renderer, texture);
    6.34 +    if (renderer->SetTextureBlendMode) {
    6.35 +        return renderer->SetTextureBlendMode(renderer, texture);
    6.36 +    } else {
    6.37 +        return 0;
    6.38 +    }
    6.39  }
    6.40  
    6.41  int
    6.42 @@ -2258,11 +2270,7 @@
    6.43      renderer->g = g;
    6.44      renderer->b = b;
    6.45      renderer->a = a;
    6.46 -    if (renderer->SetDrawColor) {
    6.47 -        return renderer->SetDrawColor(renderer);
    6.48 -    } else {
    6.49 -        return 0;
    6.50 -    }
    6.51 +    return 0;
    6.52  }
    6.53  
    6.54  int
    6.55 @@ -2299,11 +2307,7 @@
    6.56          return -1;
    6.57      }
    6.58      renderer->blendMode = blendMode;
    6.59 -    if (renderer->SetDrawBlendMode) {
    6.60 -        return renderer->SetDrawBlendMode(renderer);
    6.61 -    } else {
    6.62 -        return 0;
    6.63 -    }
    6.64 +    return 0;
    6.65  }
    6.66  
    6.67  int
     7.1 --- a/src/video/directfb/SDL_DirectFB_render.c	Mon Jan 31 23:23:57 2011 -0800
     7.2 +++ b/src/video/directfb/SDL_DirectFB_render.c	Mon Jan 31 23:37:30 2011 -0800
     7.3 @@ -51,10 +51,6 @@
     7.4                                        SDL_Texture * texture,
     7.5                                        SDL_Color * colors,
     7.6                                        int firstcolor, int ncolors);
     7.7 -static int DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer,
     7.8 -                                       SDL_Texture * texture);
     7.9 -static int DirectFB_SetTextureColorMod(SDL_Renderer * renderer,
    7.10 -                                       SDL_Texture * texture);
    7.11  static int DirectFB_UpdateTexture(SDL_Renderer * renderer,
    7.12                                    SDL_Texture * texture,
    7.13                                    const SDL_Rect * rect,
    7.14 @@ -68,7 +64,6 @@
    7.15  static void DirectFB_DirtyTexture(SDL_Renderer * renderer,
    7.16                                    SDL_Texture * texture, int numrects,
    7.17                                    const SDL_Rect * rects);
    7.18 -static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer);
    7.19  static int DirectFB_RenderDrawPoints(SDL_Renderer * renderer,
    7.20                                  const SDL_Point * points, int count);
    7.21  static int DirectFB_RenderDrawLines(SDL_Renderer * renderer,
    7.22 @@ -96,8 +91,6 @@
    7.23        SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
    7.24        SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD |
    7.25        SDL_RENDERER_ACCELERATED),
    7.26 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
    7.27 -      SDL_TEXTUREMODULATE_ALPHA),
    7.28       14,
    7.29       {
    7.30        SDL_PIXELFORMAT_INDEX4LSB,
    7.31 @@ -275,16 +268,12 @@
    7.32      renderer->QueryTexturePixels = DirectFB_QueryTexturePixels;
    7.33      renderer->SetTexturePalette = DirectFB_SetTexturePalette;
    7.34      renderer->GetTexturePalette = DirectFB_GetTexturePalette;
    7.35 -    renderer->SetTextureAlphaMod = DirectFB_SetTextureAlphaMod;
    7.36 -    renderer->SetTextureColorMod = DirectFB_SetTextureColorMod;
    7.37      renderer->UpdateTexture = DirectFB_UpdateTexture;
    7.38      renderer->LockTexture = DirectFB_LockTexture;
    7.39      renderer->UnlockTexture = DirectFB_UnlockTexture;
    7.40      renderer->DirtyTexture = DirectFB_DirtyTexture;
    7.41      renderer->RenderDrawPoints = DirectFB_RenderDrawPoints;
    7.42      renderer->RenderDrawLines = DirectFB_RenderDrawLines;
    7.43 -    /* SetDrawColor - no needed */
    7.44 -    renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode;
    7.45      renderer->RenderFillRects = DirectFB_RenderFillRects;
    7.46      renderer->RenderDrawRects = DirectFB_RenderDrawRects;
    7.47      /* RenderDrawEllipse - no reference implementation yet */
    7.48 @@ -636,18 +625,6 @@
    7.49  }
    7.50  
    7.51  static int
    7.52 -DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
    7.53 -{
    7.54 -    return 0;
    7.55 -}
    7.56 -
    7.57 -static int
    7.58 -DirectFB_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
    7.59 -{
    7.60 -    return 0;
    7.61 -}
    7.62 -
    7.63 -static int
    7.64  DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
    7.65  {
    7.66  #if (DFB_VERSION_ATLEAST(1,2,0))
     8.1 --- a/src/video/nds/SDL_ndsrender.c	Mon Jan 31 23:23:57 2011 -0800
     8.2 +++ b/src/video/nds/SDL_ndsrender.c	Mon Jan 31 23:37:30 2011 -0800
     8.3 @@ -50,10 +50,6 @@
     8.4  static int NDS_GetTexturePalette(SDL_Renderer * renderer,
     8.5                                   SDL_Texture * texture, SDL_Color * colors,
     8.6                                   int firstcolor, int ncolors);
     8.7 -static int NDS_SetTextureColorMod(SDL_Renderer * renderer,
     8.8 -                                  SDL_Texture * texture);
     8.9 -static int NDS_SetTextureAlphaMod(SDL_Renderer * renderer,
    8.10 -                                  SDL_Texture * texture);
    8.11  static int NDS_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
    8.12                               const SDL_Rect * rect, const void *pixels,
    8.13                               int pitch);
    8.14 @@ -76,7 +72,6 @@
    8.15      NDS_CreateRenderer,
    8.16      {"nds",                     /* char* name */
    8.17       (SDL_RENDERER_SINGLEBUFFER | SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC),  /* u32 flags */
    8.18 -     (SDL_TEXTUREMODULATE_NONE),        /* u32 mod_modes */
    8.19       3,                         /* u32 num_texture_formats */
    8.20       {
    8.21        SDL_PIXELFORMAT_INDEX8,
    8.22 @@ -175,14 +170,11 @@
    8.23      renderer->QueryTexturePixels = NDS_QueryTexturePixels;
    8.24      renderer->SetTexturePalette = NDS_SetTexturePalette;
    8.25      renderer->GetTexturePalette = NDS_GetTexturePalette;
    8.26 -    renderer->SetTextureColorMod = NDS_SetTextureColorMod;
    8.27 -    renderer->SetTextureAlphaMod = NDS_SetTextureAlphaMod;
    8.28      renderer->UpdateTexture = NDS_UpdateTexture;
    8.29      renderer->LockTexture = NDS_LockTexture;
    8.30      renderer->UnlockTexture = NDS_UnlockTexture;
    8.31      renderer->DestroyTexture = NDS_DestroyTexture;
    8.32  
    8.33 -    renderer->info.mod_modes = NDS_RenderDriver.info.mod_modes;
    8.34      renderer->info.num_texture_formats =
    8.35          NDS_RenderDriver.info.num_texture_formats;
    8.36      SDL_memcpy(renderer->info.texture_formats,
    8.37 @@ -557,18 +549,4 @@
    8.38      return 0;
    8.39  }
    8.40  
    8.41 -static int
    8.42 -NDS_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
    8.43 -{
    8.44 -    /* stub! */
    8.45 -    return 0;
    8.46 -}
    8.47 -
    8.48 -static int
    8.49 -NDS_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
    8.50 -{
    8.51 -    /* stub! */
    8.52 -    return 0;
    8.53 -}
    8.54 -
    8.55  /* vi: set ts=4 sw=4 expandtab: */
     9.1 --- a/src/video/photon/SDL_photon_render.c	Mon Jan 31 23:23:57 2011 -0800
     9.2 +++ b/src/video/photon/SDL_photon_render.c	Mon Jan 31 23:37:30 2011 -0800
     9.3 @@ -54,12 +54,6 @@
     9.4  static int photon_gettexturepalette(SDL_Renderer * renderer,
     9.5                                      SDL_Texture * texture, SDL_Color * colors,
     9.6                                      int firstcolor, int ncolors);
     9.7 -static int photon_settexturecolormod(SDL_Renderer * renderer,
     9.8 -                                     SDL_Texture * texture);
     9.9 -static int photon_settexturealphamod(SDL_Renderer * renderer,
    9.10 -                                     SDL_Texture * texture);
    9.11 -static int photon_settexturescalemode(SDL_Renderer * renderer,
    9.12 -                                      SDL_Texture * texture);
    9.13  static int photon_updatetexture(SDL_Renderer * renderer,
    9.14                                  SDL_Texture * texture, const SDL_Rect * rect,
    9.15                                  const void *pixels, int pitch);
    9.16 @@ -71,7 +65,6 @@
    9.17  static void photon_dirtytexture(SDL_Renderer * renderer,
    9.18                                  SDL_Texture * texture, int numrects,
    9.19                                  const SDL_Rect * rects);
    9.20 -static int photon_setdrawcolor(SDL_Renderer * renderer);
    9.21  static int photon_renderpoint(SDL_Renderer * renderer, int x, int y);
    9.22  static int photon_renderline(SDL_Renderer * renderer, int x1, int y1, int x2,
    9.23                               int y2);
    9.24 @@ -98,7 +91,6 @@
    9.25        SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
    9.26        SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD |
    9.27        SDL_RENDERER_ACCELERATED),
    9.28 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_ALPHA),
    9.29       10,
    9.30       {SDL_PIXELFORMAT_INDEX8,
    9.31        SDL_PIXELFORMAT_RGB555,
    9.32 @@ -144,13 +136,10 @@
    9.33      renderer->QueryTexturePixels = photon_querytexturepixels;
    9.34      renderer->SetTexturePalette = photon_settexturepalette;
    9.35      renderer->GetTexturePalette = photon_gettexturepalette;
    9.36 -    renderer->SetTextureAlphaMod = photon_settexturealphamod;
    9.37 -    renderer->SetTextureColorMod = photon_settexturecolormod;
    9.38      renderer->UpdateTexture = photon_updatetexture;
    9.39      renderer->LockTexture = photon_locktexture;
    9.40      renderer->UnlockTexture = photon_unlocktexture;
    9.41      renderer->DirtyTexture = photon_dirtytexture;
    9.42 -    renderer->SetDrawColor = photon_setdrawcolor;
    9.43      renderer->RenderPoint = photon_renderpoint;
    9.44      renderer->RenderLine = photon_renderline;
    9.45      renderer->RenderFill = photon_renderfill;
    9.46 @@ -872,35 +861,6 @@
    9.47  }
    9.48  
    9.49  static int
    9.50 -photon_settexturecolormod(SDL_Renderer * renderer, SDL_Texture * texture)
    9.51 -{
    9.52 -   SDL_Unsupported();
    9.53 -   return -1;
    9.54 -}
    9.55 -
    9.56 -static int
    9.57 -photon_settexturealphamod(SDL_Renderer * renderer, SDL_Texture * texture)
    9.58 -{
    9.59 -    SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
    9.60 -
    9.61 -    /* Check, if it is not initialized */
    9.62 -    if (rdata->surfaces_type==SDL_PHOTON_SURFTYPE_UNKNOWN)
    9.63 -    {
    9.64 -       SDL_SetError("Photon: can't set texture blend mode for OpenGL ES window");
    9.65 -       return -1;
    9.66 -    }
    9.67 -
    9.68 -    /* Check if current renderer instance supports alpha modulation */
    9.69 -    if ((renderer->info.mod_modes & SDL_TEXTUREMODULATE_ALPHA)!=SDL_TEXTUREMODULATE_ALPHA)
    9.70 -    {
    9.71 -       SDL_Unsupported();
    9.72 -       return -1;
    9.73 -    }
    9.74 -
    9.75 -    return 0;
    9.76 -}
    9.77 -
    9.78 -static int
    9.79  photon_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture,
    9.80                       const SDL_Rect * rect, const void *pixels, int pitch)
    9.81  {
    9.82 @@ -1025,33 +985,6 @@
    9.83  }
    9.84  
    9.85  static int
    9.86 -photon_setdrawcolor(SDL_Renderer * renderer)
    9.87 -{
    9.88 -   SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
    9.89 -
    9.90 -   /* Check, if it is not initialized */
    9.91 -   if (rdata->surfaces_type==SDL_PHOTON_SURFTYPE_UNKNOWN)
    9.92 -   {
    9.93 -       SDL_SetError("Photon: can't set draw color for OpenGL ES window");
    9.94 -       return -1;
    9.95 -   }
    9.96 -
    9.97 -   switch (rdata->surfaces_type)
    9.98 -   {
    9.99 -       case SDL_PHOTON_SURFTYPE_OFFSCREEN:
   9.100 -       case SDL_PHOTON_SURFTYPE_PHIMAGE:
   9.101 -            PgSetFillColorCx(rdata->gc, PgRGB(renderer->r, renderer->g, renderer->b));
   9.102 -            PgSetStrokeColorCx(rdata->gc, PgRGB(renderer->r, renderer->g, renderer->b));
   9.103 -            break;
   9.104 -       case SDL_PHOTON_SURFTYPE_UNKNOWN:
   9.105 -       default:
   9.106 -            break;
   9.107 -   }
   9.108 -
   9.109 -   return 0;
   9.110 -}
   9.111 -
   9.112 -static int
   9.113  photon_renderpoint(SDL_Renderer * renderer, int x, int y)
   9.114  {
   9.115     SDL_RenderData *rdata = (SDL_RenderData *) renderer->driverdata;
    10.1 --- a/src/video/qnxgf/SDL_gf_render.c	Mon Jan 31 23:23:57 2011 -0800
    10.2 +++ b/src/video/qnxgf/SDL_gf_render.c	Mon Jan 31 23:37:30 2011 -0800
    10.3 @@ -48,12 +48,6 @@
    10.4  static int gf_gettexturepalette(SDL_Renderer * renderer,
    10.5                                  SDL_Texture * texture, SDL_Color * colors,
    10.6                                  int firstcolor, int ncolors);
    10.7 -static int gf_settexturecolormod(SDL_Renderer * renderer,
    10.8 -                                 SDL_Texture * texture);
    10.9 -static int gf_settexturealphamod(SDL_Renderer * renderer,
   10.10 -                                 SDL_Texture * texture);
   10.11 -static int gf_settexturescalemode(SDL_Renderer * renderer,
   10.12 -                                  SDL_Texture * texture);
   10.13  static int gf_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture,
   10.14                              const SDL_Rect * rect, const void *pixels,
   10.15                              int pitch);
   10.16 @@ -81,8 +75,6 @@
   10.17        SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
   10.18        SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD |
   10.19        SDL_RENDERER_ACCELERATED),
   10.20 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
   10.21 -      SDL_TEXTUREMODULATE_ALPHA),
   10.22       13,
   10.23       {
   10.24        SDL_PIXELFORMAT_INDEX8,
   10.25 @@ -141,8 +133,6 @@
   10.26      renderer->QueryTexturePixels = gf_querytexturepixels;
   10.27      renderer->SetTexturePalette = gf_settexturepalette;
   10.28      renderer->GetTexturePalette = gf_gettexturepalette;
   10.29 -    renderer->SetTextureAlphaMod = gf_settexturealphamod;
   10.30 -    renderer->SetTextureColorMod = gf_settexturecolormod;
   10.31      renderer->UpdateTexture = gf_updatetexture;
   10.32      renderer->LockTexture = gf_locktexture;
   10.33      renderer->UnlockTexture = gf_unlocktexture;
   10.34 @@ -328,16 +318,6 @@
   10.35  }
   10.36  
   10.37  static int
   10.38 -gf_settexturecolormod(SDL_Renderer * renderer, SDL_Texture * texture)
   10.39 -{
   10.40 -}
   10.41 -
   10.42 -static int
   10.43 -gf_settexturealphamod(SDL_Renderer * renderer, SDL_Texture * texture)
   10.44 -{
   10.45 -}
   10.46 -
   10.47 -static int
   10.48  gf_updatetexture(SDL_Renderer * renderer, SDL_Texture * texture,
   10.49                   const SDL_Rect * rect, const void *pixels, int pitch)
   10.50  {
    11.1 --- a/src/video/windows/SDL_d3drender.c	Mon Jan 31 23:23:57 2011 -0800
    11.2 +++ b/src/video/windows/SDL_d3drender.c	Mon Jan 31 23:37:30 2011 -0800
    11.3 @@ -101,12 +101,6 @@
    11.4  static int D3D_GetTexturePalette(SDL_Renderer * renderer,
    11.5                                   SDL_Texture * texture, SDL_Color * colors,
    11.6                                   int firstcolor, int ncolors);
    11.7 -static int D3D_SetTextureColorMod(SDL_Renderer * renderer,
    11.8 -                                  SDL_Texture * texture);
    11.9 -static int D3D_SetTextureAlphaMod(SDL_Renderer * renderer,
   11.10 -                                  SDL_Texture * texture);
   11.11 -static int D3D_SetTextureBlendMode(SDL_Renderer * renderer,
   11.12 -                                   SDL_Texture * texture);
   11.13  static int D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   11.14                               const SDL_Rect * rect, const void *pixels,
   11.15                               int pitch);
   11.16 @@ -144,8 +138,6 @@
   11.17        SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
   11.18        SDL_RENDERER_PRESENTDISCARD | SDL_RENDERER_PRESENTVSYNC |
   11.19        SDL_RENDERER_ACCELERATED),
   11.20 -     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
   11.21 -      SDL_TEXTUREMODULATE_ALPHA),
   11.22       0,
   11.23       {0},
   11.24       0,
   11.25 @@ -451,9 +443,6 @@
   11.26      renderer->QueryTexturePixels = D3D_QueryTexturePixels;
   11.27      renderer->SetTexturePalette = D3D_SetTexturePalette;
   11.28      renderer->GetTexturePalette = D3D_GetTexturePalette;
   11.29 -    renderer->SetTextureColorMod = D3D_SetTextureColorMod;
   11.30 -    renderer->SetTextureAlphaMod = D3D_SetTextureAlphaMod;
   11.31 -    renderer->SetTextureBlendMode = D3D_SetTextureBlendMode;
   11.32      renderer->UpdateTexture = D3D_UpdateTexture;
   11.33      renderer->LockTexture = D3D_LockTexture;
   11.34      renderer->UnlockTexture = D3D_UnlockTexture;
   11.35 @@ -728,18 +717,6 @@
   11.36  }
   11.37  
   11.38  static int
   11.39 -D3D_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
   11.40 -{
   11.41 -    return 0;
   11.42 -}
   11.43 -
   11.44 -static int
   11.45 -D3D_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
   11.46 -{
   11.47 -    return 0;
   11.48 -}
   11.49 -
   11.50 -static int
   11.51  D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
   11.52                    const SDL_Rect * rect, const void *pixels, int pitch)
   11.53  {