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

51 lines
4.5 KiB
Plaintext

[video output=day239 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Rendering the Game Through OpenGL" vod_platform=youtube id=jH7i0YXN9FU annotator=Miblo]
[0:08][Recap and set the stage for the day]
[1:26][handmade_opengl.cpp: Look at the new hardware rendering code and consider how to enable the renderer to work through software as well as hardware]
[5:41][handmade_render_group.cpp: Introduce RenderToOutput to pick whether to render with OpenGLRenderGroupToOutput or TiledRenderGroupToOutput]
[10:17][handmade_platform.h: typedef platform_opengl_render and add *RenderToOpenGL to platform_api]
[11:29][Leave it as a little bit of a zygote][quote 357]
[11:44][handmade_opengl.cpp: Make RenderGroupToOutput only take *RenderGroup]
[12:41][Run the game and wonder how THAT just happened][quote 358]
[13:09][Debugger: Step into GameUpdate and realise that we're using the old function]
[14:09][Run the game again and hit a first-chance exception]
[14:16][win32_handmade.cpp: #include "handmade_opengl.cpp"]
[15:14][handmade_opengl.cpp: Make OpenGLRenderGroupToOutput take *OutputTarget]
[17:50][Run the game and see just our debug info]
[18:36][win32_handmade.cpp: #if0 the buffer drawing code]
[19:13][Run the game and see a bunch of solid nonsense]
[19:33][handmade_opengl.cpp: Send a texture to OpenGL every frame]
[21:12][Run the game and see that it almost works]
[23:00][Blackboard: Blending]
[31:38][handmade_opengl.cpp: Enable GL_BLEND and use glBlendFunc to specify the blending equation]
[33:23]["It's almost like the hardware is set up to do this!"][quote 359]
[33:29][Run the game and see that we are successfully reproducing our image]
[34:01][handmade_render_group.h: Add Handle to loaded_bitmap to store whether the bitmap has been submitted]
[35:59][handmade_opengl.cpp: Conditionally bind the texture or set the handle]
[37:46][Run the game and see that it now runs much zippier]
[38:18][Debugger: Learn that we have a bug in the validation code]
[39:09][Run the game and point out that the image has a shimmering look to it]
[40:04][handmade_opengl.cpp: Re-enable bilinear filtering with glTexParameteri]
[41:56][Run the game again and note that we look a lot more like the software renderer, but that our ground chunks are now messed up]
[46:47][Describe the problems with the current architecture, enabling the debug system in the process]
[50:56][Blackboard: The previous and new flows of data]
[55:21][Q&A][:speech]
[56:12][@Cynokron][Why did you choose OpenGL over DirectX?][quote 360]
[1:00:34][@TheSizik][Did you notice that the ground tiles changed when you introduced sorting?]
[1:01:18][@Mr4thDimention][I've asked this before, but I want to hear your case again, what specific things make a data-protocol based interface better than one with function calls?]
[1:05:48][@Robrobby][How is V-Sync controlled?]
[1:06:21][@cubercaleb][Does the GPU do sRGB correction automatically?]
[1:07:40][@Pseudonym73][I wasn't paying close attention, but has the OpenGL texture name thing broken hot-reloading?]
[1:08:11][@FlightSwifty][What languages do you know]
[1:08:17][@elxenoaizd][Are there any performance reasons to choose compatible OpenGL API vs Core, or is it just the fact that we get to use programmable shaders in Core?]
[1:10:15][@Evine][Is there any good reason for desktop GPUs to not have programmable blend modes? Because I've seen that most mobile GPUs have that]
[1:10:51][Blackboard: Tiled (mobile) vs Non-tiled (desktop) Framebuffer]
[1:17:26][@ttbjm][Do we get gamma correct rendering "for free" now?]
[1:17:56][@cubercaleb][Doesn't the OS automatically V-Sync you, or does that only apply in windowed mode?]
[1:18:13][@Robrobby][So gamma curve is also a OpenGL extension?]
[1:18:20][@Longboolean][I know you're probobly sick of all the Vulkan questions, but here is another one. A lot of places online frame Vulkan as the next version of OpenGL, their thought being that once Vulkan is released development / adoption of OpenGL will dwindle to the point where OpenGL drivers are no longer developed by graphics card manufacturers. Could this happen? And in the event that it does, what is your plan?]
[1:20:26][@BradSheridanMN][You stated that the APIs are very similar, but is there a visual effect that can be accomplished on DirectX and not on OpenGL or vice versa?]
[1:21:00][@andsz_][Is there a good reason why windows OpenGL headers only offer the old legacy stuff while other platforms add new stuff?]
[1:21:53][@cubercaleb][At some point can you go over the pros and cons of the different graphics APIs?]
[1:25:01][Call it a day][:speech]
[/video]