[video output=day213 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Turning Debug Switches into Events" vod_platform=youtube id=nc6WawdkDnI annotator=Miblo]
[1:31][Recap and set the stage for the day]
[2:58][Select a bunch of entities and see our frame rate getting tanked]
[3:55][handmade_platform.h and win32_handmade.cpp: Implement modifier keys]
[6:14][Debugger: Go to Definition for VK_BROWSER_BACK]
[8:11][handmade_debug.cpp: Check to see that Shift is down in order to determine when to add to the selection]
[8:53][Run the game and try multi-selecting]
[10:44][Consider consolidating data from various sources]
[12:10][handmade_config.h: #if 0 everything and investigate how to handle erroneous settings]
[14:20][handmade_render_group.cpp: Introduce the concept of a DEBUG_IF to create the debug variables]
[19:12][handmade_debug_interface.h: #define DEBUG_IF]
[25:00][handmade_render_group.cpp: Use DEBUG_IF]
[28:26][handmade_debug_interface.h: #define DEBUG_r32]
[30:29][Anticipate Jonathan Blow's language JAI]
[31:51][handmade_debug_interface.h: Rename variables to facilitate macros]
[46:29][handmade_debug_interface.h: Add DebugType_Unknown]
[47:10][handmade_debug.cpp: Continue cleaning up compile errors]
[48:24][Anticipate mr4thdimention's editor 4coder]
[50:00][handmade_debug_variables.h: Delete the file]
[50:53][handmade_debug_interface.h: Implement the ability to compile out the entire debug system]
[1:03:29][handmade_config.h: Manually rebuild the file]
[1:05:03][Run the game and see that everything is working properly]
[1:05:29][Q&A][:speech]
[1:05:43][hmh_bot Clojure is a bad language]
[1:05:58][@Psi9][Why use getkeystate() instead of WM_KEYDOWN / WM_KEYUP?]
[1:07:51][@elxenoaizd][I don't have much experience in it, but you mentioned the RTTI in C++ is not as good. Could you explain a bit why?]
[1:09:54][@Culver_Fly][I don't quite get why you need to nest the macros for DEBUG_IFs. Can you explain it?]
[1:16:38][@ijustwantfood][You mind going over your debug UI plan for those who don't know what the current plan is?]
[1:17:31][@GoldenWH][Isn't metaprogramming a security hole?]
[1:17:40][@elxenoaizd][I've been reading about the cost of virtual functions. Normal non-virtual functions costs a 'call' command, but with virtual we need two fetches and a call. Is that very costly in performance critical areas? Is that the reason to avoid virtuals? For me, I don't like the fact that they introduce hidden costs, makes it harder to reason about your code]
[1:20:14][@elxenoaizd][I can't figure out for the life of me a way to draw an empty, non-filled Rectangle via the Win32 API. I tried SelectObject(DC, GetStockObject(NULL_BRUSH)) and then Rectangle(...) but it never draws anything[ref
    site=MSDN
    page="MoveToEx Function"
    url=https://msdn.microsoft.com/en-us/library/windows/desktop/dd145069][ref
    site=MSDN
    page="SetDCPenColor Function"
    url=https://msdn.microsoft.com/en-us/library/windows/desktop/dd162970]]
[1:20:44][win32_handmade.cpp: Demo MoveToEx and LineTo]
[1:24:27][@dafreaki][What are your thoughts on twitch starting to affect game design?]
[1:27:38][@boondoggle42][Could you list the important features a good graphical debugger should have?]
[1:28:43][@gasto5][Are you one of those that thinks that previously DirectX was better than OpenGL, but now is the opposite?]
[1:28:55][@Kemosabe76][Do you know how far has metaprogramming come along in other fields? I can imagine researchers using genetic algorithms to self enhance code]
[1:29:11][Spin things down][:speech]
[/video]
