diff src/video/directfb/SDL_DirectFB_render.c @ 5144:31e7f523ab3d

Making the API simpler, texture color and alpha modulation are supported by all renderers.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 31 Jan 2011 23:37:30 -0800
parents e743b9c3f6d6
children c8e049de174c
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_render.c	Mon Jan 31 23:23:57 2011 -0800
+++ b/src/video/directfb/SDL_DirectFB_render.c	Mon Jan 31 23:37:30 2011 -0800
@@ -51,10 +51,6 @@
                                       SDL_Texture * texture,
                                       SDL_Color * colors,
                                       int firstcolor, int ncolors);
-static int DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer,
-                                       SDL_Texture * texture);
-static int DirectFB_SetTextureColorMod(SDL_Renderer * renderer,
-                                       SDL_Texture * texture);
 static int DirectFB_UpdateTexture(SDL_Renderer * renderer,
                                   SDL_Texture * texture,
                                   const SDL_Rect * rect,
@@ -68,7 +64,6 @@
 static void DirectFB_DirtyTexture(SDL_Renderer * renderer,
                                   SDL_Texture * texture, int numrects,
                                   const SDL_Rect * rects);
-static int DirectFB_SetDrawBlendMode(SDL_Renderer * renderer);
 static int DirectFB_RenderDrawPoints(SDL_Renderer * renderer,
                                 const SDL_Point * points, int count);
 static int DirectFB_RenderDrawLines(SDL_Renderer * renderer,
@@ -96,8 +91,6 @@
       SDL_RENDERER_PRESENTFLIP2 | SDL_RENDERER_PRESENTFLIP3 |
       SDL_RENDERER_PRESENTVSYNC | SDL_RENDERER_PRESENTDISCARD |
       SDL_RENDERER_ACCELERATED),
-     (SDL_TEXTUREMODULATE_NONE | SDL_TEXTUREMODULATE_COLOR |
-      SDL_TEXTUREMODULATE_ALPHA),
      14,
      {
       SDL_PIXELFORMAT_INDEX4LSB,
@@ -275,16 +268,12 @@
     renderer->QueryTexturePixels = DirectFB_QueryTexturePixels;
     renderer->SetTexturePalette = DirectFB_SetTexturePalette;
     renderer->GetTexturePalette = DirectFB_GetTexturePalette;
-    renderer->SetTextureAlphaMod = DirectFB_SetTextureAlphaMod;
-    renderer->SetTextureColorMod = DirectFB_SetTextureColorMod;
     renderer->UpdateTexture = DirectFB_UpdateTexture;
     renderer->LockTexture = DirectFB_LockTexture;
     renderer->UnlockTexture = DirectFB_UnlockTexture;
     renderer->DirtyTexture = DirectFB_DirtyTexture;
     renderer->RenderDrawPoints = DirectFB_RenderDrawPoints;
     renderer->RenderDrawLines = DirectFB_RenderDrawLines;
-    /* SetDrawColor - no needed */
-    renderer->SetDrawBlendMode = DirectFB_SetDrawBlendMode;
     renderer->RenderFillRects = DirectFB_RenderFillRects;
     renderer->RenderDrawRects = DirectFB_RenderDrawRects;
     /* RenderDrawEllipse - no reference implementation yet */
@@ -636,18 +625,6 @@
 }
 
 static int
-DirectFB_SetTextureAlphaMod(SDL_Renderer * renderer, SDL_Texture * texture)
-{
-    return 0;
-}
-
-static int
-DirectFB_SetTextureColorMod(SDL_Renderer * renderer, SDL_Texture * texture)
-{
-    return 0;
-}
-
-static int
 DirectFB_SetTextureScaleMode(SDL_Renderer * renderer, SDL_Texture * texture)
 {
 #if (DFB_VERSION_ATLEAST(1,2,0))