cinera_handmade.network/cmuratori/hero/code/code266.hmml

49 lines
3.5 KiB
Plaintext

[video output=day266 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Adding a Top Clocks Profile View" vod_platform=youtube id=qYGNxUu6tjI annotator=Miblo]
[1:35][A few words on using third-party debugging tools or reusing ones own across projects]
[3:14][Launch the game and set the stage for the day]
[7:08][handmade_debug.cpp: Provide the ability to print debug elements in descending order of cycle counts]
[9:49][stb_truetype.h: Delete]
[10:20][handmade_sort.cpp: Pull out the sort code from handmade_render_group.h and handmade_render.cpp]
[14:52][handmade_debug_interface.h: Add DebugType_TopClocksList]
[15:54][handmade_debug.cpp: Introduce DrawTopClocksList]
[24:23][handmade_debug_ui.cpp: Introduce GetBaseline]
[25:46][handmade_debug.h: Introduce debug_element_add_op for more fine-grained control of how elements are profiled]
[31:11][Run the game and view our DrawTopClocksList ouput]
[32:51][handmade.cpp: Do TopClocksList by default]
[34:15][handmade_debug.cpp: Darken the list's background]
[36:27][handmade_debug.cpp: Just print out the elements' names]
[37:29][Note that the Win32 Message Processing takes drastically longer when the mouse is moved]
[38:34][handmade_debug.h: Add Sum to debug_statistic]
[41:23][handmade_debug.cpp: Provide DrawTopClocksList the ability to print out percentages]
[46:53][handmade_debug.cpp: Prepare DrawTopClocksList for sorting]
[51:44][Run the game and see our sorted TopClocksList]
[52:44][handmade_debug.cpp: Add the Count and Percentage to the list]
[55:03][Run the game and view our TopClocksList]
[56:11]["We won't add up to 100%"][quote 469]
[58:00][Q&A][:speech]
[59:22][@gunngames][Can I avoid taxation by reinvesting into capital gains?]
[59:44][@dudeinbasement1][Why won't we add to \~100%?]
[1:00:42][@sssmcgrath][How would you self-update an exe? Right now I have a second exe that copies a file that overwrites the current exe. So main exe calls updateme.exe, closes itself, updateme sleeps for 1/2 second, then copies... There's gotta be something smarter]
[1:01:27][@zamar037][Can the percentage support a decimal place?]
[1:01:46][handmade_debug.cpp: Print the percentage as a float]
[1:02:52][@Miblo][How may you go about investigating the cycle count increase for the Input Processing when the mouse is moved?]
[1:03:49][Admire the profiler][quote 470]
[1:06:07][win32_handmade.cpp: Bring PeekMessage out of the while condition and put it in a TIMED_BLOCK]
[1:08:18][Owl of Shame Moment: The platform code does not get dynamically reloaded]
[1:09:01][Compile and run and see PeekMessage in the profiler]
[1:09:22][handmade.cpp: Move the FrameSlider into the Profile block]
[1:11:15][@dudeinbasement1][%5.2f]
[1:11:51][@sssmcgrath][My problem is the exe downloads a new exe, then I want it to replace itself, but I can't delete the running exe or even rename it while it's running. I'm fine with the game going down and coming back up, it's for updating players, not for development]
[1:13:15][win32_handmade.cpp: Implement the ability to replace and auto-reload a running executable]
[1:19:54][Internet: MoveFile[ref
site="MSDN"
page="MoveFile function"
url="https://msdn.microsoft.com/en-us/library/windows/desktop/aa365239"]]
[1:27:29][Try to replace handmade.exe with notepad.exe]
[1:31:00][win32_handmade.cpp: Fix the condition of Win32TimeIsValid]
[1:34:10][Try to replace handmade.exe with ColorCop.exe]
[1:35:16][Debugger: Try to launch and kill][quote 471]
[1:37:15][Wind things down][:speech]
[1:38:27][Promote 4coder][:speech]
[/video]