Advertise support for blending modes and scaling modes in the render driver.
authorSunny Sachanandani <sunnysachanandani@gmail.com>
Wed, 21 Jul 2010 23:18:53 +0530
changeset 4611 a2ed55b5ff85
parent 4610 32991e17e2b6
child 4612 9a5db97cd569
Advertise support for blending modes and scaling modes in the render driver.
src/video/x11/SDL_x11render.c
--- 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);