diff src/video/SDL_sysvideo.h @ 1985:8055185ae4ed

Added source color and alpha modulation support. Added perl script to generate optimized render copy functions.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 28 Aug 2006 03:17:39 +0000
parents 3f21778e7433
children c9aa6bcb26f3
line wrap: on
line diff
--- a/src/video/SDL_sysvideo.h	Thu Aug 24 12:49:59 2006 +0000
+++ b/src/video/SDL_sysvideo.h	Mon Aug 28 03:17:39 2006 +0000
@@ -44,6 +44,10 @@
     int access;         /**< SDL_TextureAccess */
     int w;              /**< The width of the texture */
     int h;              /**< The height of the texture */
+    int modMode;        /**< The texture modulation mode */
+    int blendMode;      /**< The texture blend mode */
+    int scaleMode;      /**< The texture scale mode */
+    Uint8 r, g, b, a;   /**< Texture modulation values */
 
     SDL_Renderer *renderer;
 
@@ -66,6 +70,14 @@
     int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
                               SDL_Color * colors, int firstcolor,
                               int ncolors);
+    int (*SetTextureColorMod) (SDL_Renderer * renderer,
+                               SDL_Texture * texture);
+    int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
+                               SDL_Texture * texture);
+    int (*SetTextureBlendMode) (SDL_Renderer * renderer,
+                                SDL_Texture * texture);
+    int (*SetTextureScaleMode) (SDL_Renderer * renderer,
+                                SDL_Texture * texture);
     int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
                           const SDL_Rect * rect, const void *pixels,
                           int pitch);
@@ -75,11 +87,10 @@
     void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
     void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
                           int numrects, const SDL_Rect * rects);
-    int (*RenderFill) (SDL_Renderer * renderer, const SDL_Rect * rect,
-                       Uint32 color);
+    int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
+                       Uint8 a, const SDL_Rect * rect);
     int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
-                       const SDL_Rect * srcrect, const SDL_Rect * dstrect,
-                       int blendMode, int scaleMode);
+                       const SDL_Rect * srcrect, const SDL_Rect * dstrect);
     void (*RenderPresent) (SDL_Renderer * renderer);
     void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);