You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not really sure whether this is an SDL renderer issue or an SDL_image one, but it's only manifested for me as the result of a sequence of steps involving loading a PNG from a file.
I used IMG_LoadTyped_IO to load a PNG that had no alpha channel into a surface, then SDL_CreateTextureFromSurface to make a texture.
My rendering target is a SDL_PIXELFORMAT_RGBA32 texture, and I'm in SDL_BLENDMODE_BLEND. When I call SDL_RenderTexture to draw that texture that I'd loaded, the result varies: it draws at full opacity in a Windows executable, and in an Emscripten webapp if I'm running it in Firefox, but it draws nothing if I'm running the same Emscripten webapp in Chromium.
For my own current purposes, I can easily work around this by just only using PNGs that have an alpha channel in the first place.
The text was updated successfully, but these errors were encountered:
I'm sorry, but I haven't been able to come up with a reproducer for this inconsistency (I'd observed it in the course of quite a large program). For reference, the Chromium in question was "Version 128.0.6613.113 (Official Build, ungoogled-chromium) (64-bit)" and the Firefox was "132.0.1 (64-bit)", both on Linux.
I am observing one anomaly: SDL_SetRenderTarget(renderer, rgba32texture); SDL_RenderTexture(renderer, rgb24texture,NULL); sets the target RGBA texture's alpha channel to 0 as opposed to 255 or unchanged, which is a behavior that seems counterintuitive to me and worth documenting, but that's happening consistently without a cross-browser divergence (matching the Chromium, not Firefox, observation from before.)
I'm not really sure whether this is an SDL renderer issue or an SDL_image one, but it's only manifested for me as the result of a sequence of steps involving loading a PNG from a file.
I used IMG_LoadTyped_IO to load a PNG that had no alpha channel into a surface, then SDL_CreateTextureFromSurface to make a texture.
My rendering target is a SDL_PIXELFORMAT_RGBA32 texture, and I'm in SDL_BLENDMODE_BLEND. When I call SDL_RenderTexture to draw that texture that I'd loaded, the result varies: it draws at full opacity in a Windows executable, and in an Emscripten webapp if I'm running it in Firefox, but it draws nothing if I'm running the same Emscripten webapp in Chromium.
For my own current purposes, I can easily work around this by just only using PNGs that have an alpha channel in the first place.
The text was updated successfully, but these errors were encountered: