Unexpected SDL_BLENDMODE
differences in SDL_CreateTextureFromSurface()
and SDL_CreateTexture()
#9941
Milestone
SDL_BLENDMODE
differences in SDL_CreateTextureFromSurface()
and SDL_CreateTexture()
#9941
When creating a surface using
SDL_CreateSurfaceFrom()
withSDL_PIXELFORMAT_RGBA32
, blend mode is set toSDL_BLENDMODE_BLEND
.SDL_CreateTextureFromSurface()
then goes in and copies the blend mode from the surface to the texture. Due to limitations on setting properties (static/streaming) I went withSDL_CreateTexture()
, which obv does not copy the blend mode.This whole behavoir difference is a bit unintuitive, and I propose to make the behavoir the same for surfaces and textures.
edit: just found out its actually worse, the blend mode is always set to BLEND if the source surface has alpha, and copied otherwise:
SDL/src/render/SDL_render.c
Lines 1619 to 1625 in fd2b9c0
The text was updated successfully, but these errors were encountered: