Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL_Texture alpha mod value is lost on window resize with render logic size #1185

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

Reported in version: 2.0.0
Reported for operating system, platform: Windows 7, x86_64

Comments on the original bug report:

On 2013-11-02 03:03:00 +0000, Rubinson Ivan wrote:

I have a window with SDL_WINDOW_RESIZABLE flag, and it's renderer has a logical size of 640x480. I create an SDL_Surface*, apply colorkey on it, and then convert it to an SDL_Texture*. On top of that, I set the SDL_Texture*s alpha mod to some value and blend mode to SDL_BLENDMODE_BLEND. When the window is resized, the texture becomes fully opaque (the alpha mod value is lost).

On 2013-12-20 03:32:28 +0000, wrote:

Just want to add: I too have run into this bug, even without using the Logical Size or Color Key functions. Simply using an accelerated renderer and a semi-transparent PNG texture, calling SDL_SetWindowSize seems to break SDL_SetTextureAlphaMod. I can provide an example ZIP if necessary.

On 2017-08-14 10:32:15 +0000, Sam Lantinga wrote:

Yes, an example would be great, thanks!

On 2017-08-17 15:06:28 +0000, wrote:

Still seems to happen in 2.0.5 (Windows / mingw / x86).
You can try this example:
http://github.com/kenmo-pb/SDL-Tests/blob/master/bug2202_main.c

32x32 PNG for testing:
http://github.com/kenmo-pb/SDL-Tests/raw/master/32x32.png

On 2017-09-12 15:24:33 +0000, wrote:

Disregard my previous comment! I may have been testing with the wrong version of SDL2.dll

This bug seems to have been fixed sometime since 2.0.0.

Using the 2.0.5 and prerelease 2.0.6 DLLs, the texture alpha seems to be correctly preserved after calling SDL_SetWindowSize.

On 2017-09-12 16:46:31 +0000, Sam Lantinga wrote:

Glad to hear it! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant