So I’m having this problem with textures while working on a game. Let me
I have a .png, all of its pixels are white (RGB = 255, 255, 255) and have
alpha values equal to 0. I load that png to a texture, this is supposed to
be transparent texture. I create second texture from actual drawings for
the game. When I put the transparent texture on the top of the actual game
image - nothing gets displayed on the screen. Because the transparent
texture doesn’t have any non-0 alpha pixels, it shouldn’t affect the
drawings on the screen, right? It’s like blending mode get set to
SDL_BLENDMODE_NONE for this case.
I tried setting the blending for the textures to SDL_BLENDMODE_BLEND
(although the textures are created with the same blend mode as far as I
know), I tried changing the renderer’s blend mode still (from desperation)
- nothing. The problem doesn’t seem to appear if I have non-transparent
pixels on texture. Why is this happening? Can I make the blending actually
work in this way?