[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Fading In and Out from the Windows Desktop" vod_platform=youtube id=hsKMH89VmR8 annotator=Miblo]
[55:44][@m1el][Casey, you need one more state to wait for alpha-enabled window to show, because you might have the same bug when you fade to desktop]
[57:25][@SteelGolem][Your fading setup seems overcomplicated to me. Why not just take a screenshot, blit that to the back buffer, and fade that? What platforms wouldn't that work for?]
[1:00:26][@insofaras][Why are you using a second window for the fade in, instead of just fading in the main window?]
[1:02:06][@Miblo][Wow, thank you for such a comprehensive A: to my Q:. That's exactly what I wanted! Another small one: Would it be possible to make bits of the window transparent, e.g. for the situation where some monstar has torn a hole in the game window, revealing the desktop beneath?]
[1:03:31][@Mr4thDimention][Suppose you're Microsoft, but instead of wanting all of the money in the world you just want to make a living selling your OS. Do you think you could do that while providing a good way for users of your platform to debug the code that uses your API?]
[1:05:17][@insofaras][Can you not unset the layered window flag after doing the fade?]
[1:07:15][@SteelGolem][Wait, why can I Alt-PrintScreen to capture HDCP with windows but I can't take a screencap manually? I have lots of screenshots of my PS3 through the player via prntscrnt]
[1:08:53][@blah238][So this detour was all about startup and shutdown fades, but how would you implement fading in between in-game scenes? This shouldn't involve the Windows API, correct?]
[1:09:25][handmade_cutscene.h: Add tFadeIn to layered_scene]
[1:10:35][handmade_cutscene.cpp: Implement fade to black between cutscene shots]
[1:12:56][Run the game and see that fade]
[1:13:27][Note that the alpha must be gamma corrected]