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

40 lines
3.4 KiB
Plaintext
Raw Normal View History

[video member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Using Memory Arenas in the Platform Layer" vod_platform=youtube id=ImWSMzMe1kI annotator=Miblo]
[0:31][Recap and set the stage for the day]
[2:02][handmade_opengl.cpp: Consider making this whole file platform independent]
[4:58][handmade_platform.h: Consider moving platform_opengl_display_bitmap and platform_opengl_render_commands in from handmade_opengl.cpp]
[7:10][Consider (the downsides of) making all the platform layers include bindings and link the dll with opengl]
[9:59][win32_handmade.cpp: Make Win32DisplayBufferInWindow() call SortEntries(), and consider moving the sorting or the memory arena into the platform specific layer]
[11:31][Create handmade_memory.h and #include it handmade_shared.h]
[17:07][Consider the concept of an overflow memory state]
[20:13][win32_handmade.cpp: Make Win32DisplayBufferInWindow() take a memory_arena and create some temporarary_memory for SortEntries() and LinearizeClipRects() to use]
[24:00][handmade_opengl.cpp: Make OpenGLRenderCommands() call GetSortedIndices()]
[25:03][handmade_render.cpp: Make RenderCommandsToBitmap() call GetSortedIndices()]
[26:02][handmade_platform.h: Introduce game_render_prep struct and make the necessary functions take it]
[31:44][handmade_render.cpp: Introduce PrepForRender()]
[33:17][4coder: Request a mode that automatically creates a boundary in the bottom-right corner]
[33:52][win32_handmade.cpp: Stop WinMain() from dealing with the ClipMemory and make LinearizeClipRects() in handmade_render.cpp do it itself]
[35:37][On the importance of good utility functionality]
[41:29][Create handmade_render.h and stick the sprite structs in there]
[49:50][Run the game and hit the assertion in OpenGLRenderCommands()]
[52:10][handmade_render.cpp: Assert that OutIndex - OutIndexArray == InputNodeCount in WalkSpriteGraph(), and make SortEntries() traverse the nodes and write the indices of them]
[54:41][Run the game and see that all of our stuff is flowing without crashing]
[55:15][handmade_render.cpp: Make RecursiveFromToBack() correctly increment the OutIndex]
[55:49][Run the game and hit the assertion in BuildSpriteGraph()]
[56:10][handmade_render.cpp: Explain how RecursiveFromToBack() is working]
[58:30][handmade_render_group.cpp: Make PushRenderElement_() clear Flags]
[59:42][Run the game, confirm that our sort isn't working and consider how to make it work]
[1:02:43][Q&A][:speech]
[1:04:32][@insobot][Line 31?]
[1:06:05][@roam00010011][Since no on-topic, off-topic: Will the final game be orthographic?]
[1:06:42][@bryanwwag][When you're calculating pre-allocated buffer locations with offsets, do you find the pointer bugs that pop up sometimes difficult to track down, or is that kind of a non-issue when you do it often enough?]
[1:13:54][@roam00010011][Which system did you start programming on, way back in the previous millennium?[ref
site="Wikipedia"
page="Rainbow 100"
url="https://en.wikipedia.org/wiki/Rainbow_100"]]
[1:14:55][@soysaucethekid][I know there is debug code for how long functions take. Is there any debug code for how much of a memory arena is being used?]
[1:15:47][Recollections of the Rainbow 100 and Turbo Pascal]
[1:20:46][@roam00010011][Did you program on the Amiga?]
[1:21:07][@pseudonym73][Did it have Word Star key bindings? That's really the test]
[1:21:14][Close down][:speech]
[/video]