changeset 4611:a2ed55b5ff85

Advertise support for blending modes and scaling modes in the render driver.
author Sunny Sachanandani <sunnysachanandani@gmail.com>
date Wed, 21 Jul 2010 23:18:53 +0530
parents 32991e17e2b6
children 9a5db97cd569
files src/video/x11/SDL_x11render.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/video/x11/SDL_x11render.c	Wed Jul 21 23:08:09 2010 +0530
+++ b/src/video/x11/SDL_x11render.c	Wed Jul 21 23:18:53 2010 +0530
@@ -271,6 +271,10 @@
     int major, minor;
     if (CheckXRender(data->display, &major, &minor)) {
         info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_ARGB8888;
+        info->blend_modes = (SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD |
+                             SDL_BLENDMODE_MOD | SDL_BLENDMODE_MASK);
+        info->scale_modes = (SDL_TEXTURESCALEMODE_FAST | SDL_TEXTURESCALEMODE_SLOW |
+                             SDL_TEXTURESCALEMODE_BEST);
     }
 #endif
 
@@ -378,6 +382,8 @@
         /* Add some blending modes to the list of supported blending modes */
         renderer->info.blend_modes |=
             (SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MASK | SDL_BLENDMODE_MOD);
+        renderer->info.scale_modes |=
+            (SDL_TEXTURESCALEMODE_FAST | SDL_TEXTURESCALEMODE_SLOW | SDL_TEXTURESCALEMODE_BEST);
         /* Create a clip mask that is used for rendering primitives. */
         data->stencil = XCreatePixmap(data->display, data->xwindow,
                                    window->w, window->h, 32);