In the application I write, there is a scrolling text running across
the screen. I know i can avoid unnecessary CPU operation during alpha
chanel blitting by converting text surface into a surface “suitable
for fast blitting onto the display surface” by using SDL_DisplayFormat.
Unfortunately, this turns the rendered text into opaque blocks. And
this is probably the correct way, since there is no information about
the background of the text.
What if I make a new surface without alpha chanel, paint it in bg
color, then blit the text on it, then convert it to “suitable” format
and use for faster blits?
Should I use SDL_CreateRGBSurface with specified width, height, 0 for
non-alpha and screen->format->Xmask for mask values?–