bl0ckeduser/blokvm — comment on commit 40de918a58961a7b4ba539678c0691f372d9bea8
File:  line 0
By bl0ckeduser:

It looks like the only SDL function that does alpha blending is
SDL_BlitSurface. Grepping the SDL source tree for "blend" leads to the
SDL_BlitSurface code; similarly, the SDL docs say that with
SDL_FillRect, "no blending takes place".

Unfortunately, as noted earlier, SDL_BlitSurface doesn't implement
stretching, which we need. Thus the only two solutions I foresee are:

a) writing stretched RGBA pixels to a temporary RGBA surface for each
Draw/vDraw call before SDL-blitting this temporary surface. The
surface would have to be cleared before each Draw/vDraw, and we would
actually be blitting twice, once RGBA->RGBA (stretched pixels ->
buffer), and once RGBA->RGB (buffer -> screen).

b) stretching and alpha-blending the pixels ourselves before calling
putpixel [which is what the code currently does].