I’m playing with texture buffering, in this case scenario I create some random numbers and feed them as pixels in RGBA8888 format.
The left side of screen I use a bit of
bitshifting and the right size I use the
Color on right side is more “washed out” while the bitshifted not.
Anyhow in both cases I would expect more colors not only the blue tinted screen. I cannot see red, in picture, not in a single pixel.
It’s important to say that both sides use the SAME random value to draw the pixel.
rnd = rand(); r = rnd & 0x000000ff; g = rnd >> 8 & 0x000000ff; b = rnd >> 16 & 0x000000ff; *pixels_l = SDL_MapRGBA( mapformat, r, g, b, 0xff); *pixels_r = rnd | 0x000000ff;
The code is here texture_buffering.c (2.0 KB)