Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Advertise support for blending modes and scaling modes in the render …
Browse files Browse the repository at this point in the history
…driver.
  • Loading branch information
sunnyps committed Jul 21, 2010
1 parent 3d32d92 commit 70c395f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/x11/SDL_x11render.c
Expand Up @@ -271,6 +271,10 @@ X11_AddRenderDriver(_THIS)
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

Expand Down Expand Up @@ -378,6 +382,8 @@ X11_CreateRenderer(SDL_Window * window, Uint32 flags)
/* 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);
Expand Down

0 comments on commit 70c395f

Please sign in to comment.