We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2630 - Loss of Window Focus Changes Alpha Blending of Textures
Summary: Loss of Window Focus Changes Alpha Blending of Textures
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: render (show other bugs)
Version: 2.0.3
Hardware: x86_64 Windows 8
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-07 01:52 UTC by Robert
Modified: 2014-07-07 01:52 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert 2014-07-07 01:52:23 UTC
When the window is created SDL_WINDOW_FULLSCREEN_DESKTOP, and focus is lost and restored any alpha blending is lost on the texture.

Here is the object's constructor that sets the alpha blend:

Bubble(SDL_Point pt, int radi, Uint32 format, SDL_Color clr, SDL_Renderer* render)
	{
		Circle* circle = new Circle();
		circle->Set_Radi(radi);
		circle->Set_X(pt.x);
		circle->Set_Y(pt.y);
		area.x = pt.x;
		area.y = pt.y;
		prec_area = circle;
		Img = RenderCircle_Fill(radi, clr, format, render); //Draws a circle
		SDL_SetTextureAlphaMod(Img, 100); //This works until loss of focus
		Recalibrate();
		popped = false;
		alive = true;
		up = rand() % 15 + 5;
	}
To my knowledge, any texture works with this issue. When in fullscreen, use Alt + tab to see the issue.