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

51 lines
4.1 KiB
Plaintext

[video output=day324 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Moving Away from Multiple OpenGL Contexts" vod_platform=youtube id=B5LcmXI1O6w annotator=Miblo]
[0:13][Recap and consult the issues list[ref
site="GitHub"
page="HandmadeHero/cpp Issues"
url="https://github.com/HandmadeHero/cpp/issues"]]
[4:34][Run the game, demo our current situation and determine to fix the "PackEntityIntoChunk linked list bug" issue]
[5:31][handmade_world.cpp: Tweak the linked list in PackEntityIntoChunk()]
[7:37][Run the game, close this issue and determine to fix the "Wrong MetersToPixels" one]
[11:04][Blackboard: MetersToPixels]
[13:10][handmade_world.mode.cpp: Make UpdateAndRenderWorld() compute MetersToPixels oppositely and tweak the camera values]
[17:15][handmade_opengl.cpp: Toggle on the debug outlines, run the game and tweak those camera values]
[19:23][Consider that issue fixed and determine to fix the "Asynchronous Texture Downloads" one]
[22:05][handmade_opengl.cpp: Describe how the AllocateTexture works]
[23:29][handmade_opengl.cpp: Remove the glFlush call, run the game and see that it kind of works on an AMD GPU]
[25:57][win32_handmade.cpp: Consider the problem with the OpenGL multithreaded stuff]
[27:30][Blackboard: How the texture currently gets moved to the GPU]
[29:53][Blackboard: Using pinned memory to streamline the transfer into texture memory]
[33:52][handmade_opengl.cpp: Introduce OpenGLManageTextures() in order to defer the AllocateTexture and DeallocateTexture]
[35:40][Blackboard: Deferring the texture download]
[36:16][handmade_render.h: Introduce texture_op, texture_op_allocate and texture_op_deallocate structs]
[38:46]["I find that concurrency is one thing, but flow control is really the harder thing"][quote 517]
[40:10][handmade_asset.cpp: Consider how better to set the TextureHandle in LoadAssetWorkDirectly()]
[42:15][handmade_render.h: Add ResultHandle to texture_op_allocate and Handle to texture_op_deallocate to enable us to ensure that the asset stays around long enough for the allocate call to complete]
[43:49][handmade_opengl.cpp: Make OpenGLManageTextures() loop through the textures and allocate / deallocate them as required]
[46:35][handmade_opengl.cpp: Introduce OpenGLAllocateTexture()]
[49:15][A few words on producers and consumers, and ticket taking]
[51:22][handmade_asset.cpp: Consider doing some general cleanup and removing the asset lock]
[53:03][handmade_asset.cpp: Introduce AddOp() with a view to implementing it tomorrow]
[55:27][Run the game and see that we're in no man's land]
[55:42][Q&A][:speech]
[56:51][@thesizik][It's a bit late now, but I was thinking debug sliders for FOV and camera distance could be useful]
[57:45][@snoringtortoise][On the bug list, what is that Clang compatibility issue? I'm working on a Macbook using LLVM, so may be able to work it out]
[1:00:49][@erdomina][I still see flickering on the stairs. Is the sort solution finalized?]
[1:01:54][@omnitechnomancer][Is the issue list private?]
[1:02:36][@zilarrezko][Would you normally skip straight to OpenGL or hardware acceleration, or would you start with software rendering?]
[1:03:18][@snoringtortoise][In terms of asynchronous textures loading, the OpenGL website talks about pixel transfer operations and references glPixelStore. Did you look into these?[ref
site="Dominik Göddeke"
page="GPGPU::Fast Transfer Tutorial"
url="www.mathematik.tu-dortmund.de/~goeddeke/gpgpu/tutorial3.html"]]
[1:06:22][@omnitechnomancer][Is that persistent texture mapping?[ref
site="OpenGL"
page="ARB_buffer_storage"
url="https://www.opengl.org/registry/specs/ARB/buffer_storage.txt"]]
[1:09:24][@lucid_frost][I saw the tweet by Sean Barrett about the Vulkan API vs the OpenGL API. What are the main flaws in the OpenGL API?]
[1:11:52][@lucid_frost][Tweet by Sean Barrett[ref
site="Twitter"
page="#include <vulkan/vulkan.h> I can see they put a lot of work into avoiding making the same cross-platform API design mistakes as OpenGL!"
url="https://twitter.com/nothings/status/762456490661728256"]]
[1:13:27][Wrap it up][:speech]
[/video]