comparison src/video/x11/SDL_x11render.c @ 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
comparison
equal deleted inserted replaced
4610:32991e17e2b6 4611:a2ed55b5ff85
269 269
270 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER 270 #ifdef SDL_VIDEO_DRIVER_X11_XRENDER
271 int major, minor; 271 int major, minor;
272 if (CheckXRender(data->display, &major, &minor)) { 272 if (CheckXRender(data->display, &major, &minor)) {
273 info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_ARGB8888; 273 info->texture_formats[info->num_texture_formats++] = SDL_PIXELFORMAT_ARGB8888;
274 info->blend_modes = (SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD |
275 SDL_BLENDMODE_MOD | SDL_BLENDMODE_MASK);
276 info->scale_modes = (SDL_TEXTURESCALEMODE_FAST | SDL_TEXTURESCALEMODE_SLOW |
277 SDL_TEXTURESCALEMODE_BEST);
274 } 278 }
275 #endif 279 #endif
276 280
277 for (i = 0; i < _this->num_displays; ++i) { 281 for (i = 0; i < _this->num_displays; ++i) {
278 SDL_AddRenderDriver(&_this->displays[i], &X11_RenderDriver); 282 SDL_AddRenderDriver(&_this->displays[i], &X11_RenderDriver);
376 0, 0, 380 0, 0,
377 window->w, window->h); 381 window->w, window->h);
378 /* Add some blending modes to the list of supported blending modes */ 382 /* Add some blending modes to the list of supported blending modes */
379 renderer->info.blend_modes |= 383 renderer->info.blend_modes |=
380 (SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MASK | SDL_BLENDMODE_MOD); 384 (SDL_BLENDMODE_BLEND | SDL_BLENDMODE_ADD | SDL_BLENDMODE_MASK | SDL_BLENDMODE_MOD);
385 renderer->info.scale_modes |=
386 (SDL_TEXTURESCALEMODE_FAST | SDL_TEXTURESCALEMODE_SLOW | SDL_TEXTURESCALEMODE_BEST);
381 /* Create a clip mask that is used for rendering primitives. */ 387 /* Create a clip mask that is used for rendering primitives. */
382 data->stencil = XCreatePixmap(data->display, data->xwindow, 388 data->stencil = XCreatePixmap(data->display, data->xwindow,
383 window->w, window->h, 32); 389 window->w, window->h, 32);
384 390
385 /* Create the GC for the clip mask. */ 391 /* Create the GC for the clip mask. */