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

Commit

Permalink
Set the alpha mask fixing software rendering in OpenGL
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Nov 27, 2008
1 parent c366a44 commit 0e4a10e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/video/SDL_yuv_sw.c
Expand Up @@ -939,10 +939,13 @@ SDL_SW_SetupYUVDisplay(SDL_SW_YUVTexture * swdata, Uint32 target_format)
for (i = 0; i < 256; ++i) {
r_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Rmask));
r_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Rmask);
r_2_pix_alloc[i + 256] |= Amask;
g_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Gmask));
g_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Gmask);
g_2_pix_alloc[i + 256] |= Amask;
b_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Bmask));
b_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Bmask);
b_2_pix_alloc[i + 256] |= Amask;
}

/*
Expand Down

0 comments on commit 0e4a10e

Please sign in to comment.