[video output=day259 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="OpenGL and Software Renderer Cleanup" vod_platform=youtube id=wUbe27tz8Gg annotator=Miblo] [0:08][Recap and set the stage for the day] [1:30][Run the game and demonstrate how we'd like to develop the profiler] [6:10][handmade_debug.cpp: Look through the profiler code] [8:55][handmade_debug.cpp: Use ThreadOrdinal to set the LaneIndex] [10:12][Run the game and view the profiler information in LANES] [12:11][handmade_debug.cpp: Investigate why the background colour is incorrect in the software renderer] [14:42][handmade_debug.h: Introduce UITransform layer] [15:38][Run the game, view the profile and investigate why it is pink] [17:21][handmade_render.cpp: Make DrawRectangle SIMD and do alpha blending] [26:01][Debugger: Break on FillRect and find that it and ClipRect never intersect] [28:40][handmade_render.cpp: Set FillRect earlier] [29:17][Debugger: Step through and inspect the rectangle values] [34:30][handmade_render.cpp: Use structured art to help debug this] [35:17][Debugger: Inspect the Blended values] [36:42][handmade_render.cpp: Multiply Color by 255 in order to get it into the correct space] [37:42][Run the game, see that the colours are incorrect and investigate why] [41:51][handmade_render.cpp: Square the ColorValues up front] [44:28][Run the game and see that the colours are now correct] [45:19][win32_handmade.cpp: Reenable our threads and view the profiler] [46:06][handmade_opengl.cpp: Take account of the 1-pixel border in OpenGLRectangle] [49:30][handmade_opengl.cpp: Pass the corrected coordinates to OpenGLRectangle in OpenGLRenderCommands] [51:47][Run the game and see that the fonts look more correct] [53:00][GitHub: Close issue #15] [54:16][win32_handmade.cpp: Check for OpenGLSupportsSRGBFramebuffer in Win32SetPixelFormau] [55:53][handmade_opengl.cpp: Make OpenGLInit take FramebufferSupportsSRGB] [57:54][Run the game and admire how close we match] [58:21][Fight the urge to go back and correct it][quote 446] [59:07][handmade_opengl.cpp: Support the ARB versions of our extensions] [1:01:25][GitHub: Close issue #8] [1:02:59][Debugger: Break into OpenGLGetInfo and see what extensions this GPU supports] [1:04:40][Q&A][:speech] [1:05:37][@desuused][I've implemented a quick and dirty flame graph for Handmade Hero] [1:06:23][@erdomina][Is the stream being off tomorrow an April Fool's joke?] [1:06:40][@cubercaleb][What happened to the software rendered performance? It was running at 30 FPS a few months ago! Even without -O2 it was pretty decent] [1:07:07][build.bat: Switch to -O2 and watch the profiler] [1:09:01][win32_handmade.cpp: Switch to Win32RenderType_RenderSoftware_DisplayGDI and again watch the profiler] [1:11:12][@cubercaleb][So let me get this straight, modern PCI-E connections have several GB/s of bandwidth and yet it takes several frames to upload a texture for the backbuffer?] [1:13:20][Go eat some dinner][:speech] [/video]