[video output=day005 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Windows Graphics Review" vod_platform=youtube id=w7ay7QXmo_o annotator=jacebennett annotator=Miblo] [1:09][Brief overview of the week's work.] [2:13][Capture card considered unneccesary?] [3:07][Value of HREDRAW and VREDRAW] [4:48][Helping the compiler optimize by avoiding unnecessary pointers] [6:30][Explanation of pointer aliasing] [11:44][What difference does it make if I put a declaration inside a loop instead of outside it?] [18:30][Where to get Liberation Mono, the font Casey uses.] [19:34][Dealing with global variables more cleanly by bundling them up into structures] [28:58][Making a global backbuffer] [29:59][Explanation of Access Violations] [33:16][Aside about types of errors you find in code] [37:12][GetWindowDimension() created] [41:02][Why keep using Width/Height instead of win32_window_dimension?] [43:38][Changing the backbuffer to be fixed size] [47:17][Full step-through with in-depth analyis of program behavior] [52:44][Deep dive on the size of the stack] [55:50][STACK OVERFLOW ACHIEVED] [1:01:45][Step-through resumed] [1:23:35][Q&A][:speech] [1:24:06][Would it be a good or bad idea to get one DeviceContext at the beginning of the program and use that for every iteration of the main loop?] [1:26:06][Chihuahua on speed confirmed] [1:26:22][Why do you tell Windows you handle messages you don't really handle?] [1:29:06][I believe SetStretchBltMode() will allow you to get better quality stretching.] [1:29:40][Can you please explain pointer aliasing again?] [1:45:47][:Owl of Shame Moment: Pointer aliasing explanation fail] [1:49:26][Proper pointer aliasing explanation] [1:57:22][I was under the impression that the stack always grows downwards on little endian architectures, is that not true?] [1:58:10][Can you post interesting e-mails you get to the site?] [1:58:31][The compiler is allowed to, and actually does, assume that two pointers to different types never alias unless one of the types is char or unsigned char] [1:59:46][Win32DisplayBufferInWindow() is taking four unused parameters. WM_PAINT is the only part where we pass those, but we never use them. Will that change?] [2:01:02][Wouldn't it be better to keep comments in the code about the explanations you do?] [2:01:27][Why have BytesPerPixel as a variable? Do you expect it to have different values?] [2:03:04][On the uselessness of const] [/video]