Mercurial > sdl-ios-xcode
comparison src/video/SDL_yuv_sw.c @ 2795:9e7ce3069096
Set the alpha mask fixing software rendering in OpenGL
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 27 Nov 2008 22:11:01 +0000 |
parents | 6bacfecbf27e |
children | 7e5ff6cd05bf |
comparison
equal
deleted
inserted
replaced
2794:f7872b7a8732 | 2795:9e7ce3069096 |
---|---|
937 * Set up entries 0-255 in rgb-to-pixel value tables. | 937 * Set up entries 0-255 in rgb-to-pixel value tables. |
938 */ | 938 */ |
939 for (i = 0; i < 256; ++i) { | 939 for (i = 0; i < 256; ++i) { |
940 r_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Rmask)); | 940 r_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Rmask)); |
941 r_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Rmask); | 941 r_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Rmask); |
942 r_2_pix_alloc[i + 256] |= Amask; | |
942 g_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Gmask)); | 943 g_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Gmask)); |
943 g_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Gmask); | 944 g_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Gmask); |
945 g_2_pix_alloc[i + 256] |= Amask; | |
944 b_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Bmask)); | 946 b_2_pix_alloc[i + 256] = i >> (8 - number_of_bits_set(Bmask)); |
945 b_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Bmask); | 947 b_2_pix_alloc[i + 256] <<= free_bits_at_bottom(Bmask); |
948 b_2_pix_alloc[i + 256] |= Amask; | |
946 } | 949 } |
947 | 950 |
948 /* | 951 /* |
949 * If we have 16-bit output depth, then we double the value | 952 * If we have 16-bit output depth, then we double the value |
950 * in the top word. This means that we can write out both | 953 * in the top word. This means that we can write out both |