Compiling and Linking Shaders in OpenGL ⚠ Click here to regain focus ⚠
?
?

Keyboard Navigation

Global Keys

W, A, P / S, D, N Jump to previous / next marker
z Toggle filter mode V Revert filter to original state

Menu toggling

q Quotes r References f Filter c Credits

Movement

a
w
s
d
h j k l


Quotes and References Menus

Enter Jump to timecode

Quotes, References and Credits Menus

o Open URL (in new tab)

Filter Menu

x, Space Toggle category and focus next
X, ShiftSpace Toggle category and focus previous
v Invert topics / media as per focus

Credits Menu

Enter Open URL (in new tab)
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
0:08Recap and set the stage for the day
4:06Attend to the "Getting max allowed samples for texture correctly" issue1
4:06Attend to the "Getting max allowed samples for texture correctly" issue1
4:06Attend to the "Getting max allowed samples for texture correctly" issue1
6:16"Martins is almost always right"α
6:16"Martins is almost always right"α
6:16"Martins is almost always right"α
7:00handmade_opengl.cpp: #define GL_MAX_COLOR_TEXTURE_SAMPLES and GL_MAX_DEPTH_TEXTURE_SAMPLES for OpenGLRenderCommands() to use
7:00handmade_opengl.cpp: #define GL_MAX_COLOR_TEXTURE_SAMPLES and GL_MAX_DEPTH_TEXTURE_SAMPLES for OpenGLRenderCommands() to use
7:00handmade_opengl.cpp: #define GL_MAX_COLOR_TEXTURE_SAMPLES and GL_MAX_DEPTH_TEXTURE_SAMPLES for OpenGLRenderCommands() to use
9:24handmade_opengl.cpp: Drawing to the framebuffer and why we must call glBlitFramebuffer() to do a multisample resolve
9:24handmade_opengl.cpp: Drawing to the framebuffer and why we must call glBlitFramebuffer() to do a multisample resolve
9:24handmade_opengl.cpp: Drawing to the framebuffer and why we must call glBlitFramebuffer() to do a multisample resolve
12:12Research glBlitFramebuffer()2
12:12Research glBlitFramebuffer()2
12:12Research glBlitFramebuffer()2
14:19Research how to do the multisample resolve3
14:19Research how to do the multisample resolve3
14:19Research how to do the multisample resolve3
15:48handmade_opengl.cpp: Enable OpenGLRenderCommands() to bind the framebuffer and perform the multisample resolve
15:48handmade_opengl.cpp: Enable OpenGLRenderCommands() to bind the framebuffer and perform the multisample resolve
15:48handmade_opengl.cpp: Enable OpenGLRenderCommands() to bind the framebuffer and perform the multisample resolve
20:28handmade_opengl.cpp: #define GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER from the corearb.h4
20:28handmade_opengl.cpp: #define GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER from the corearb.h4
20:28handmade_opengl.cpp: #define GL_READ_FRAMEBUFFER and GL_DRAW_FRAMEBUFFER from the corearb.h4
21:13win32_handmade.cpp: typedef gl_blit_framebuffer
21:13win32_handmade.cpp: typedef gl_blit_framebuffer
21:13win32_handmade.cpp: typedef gl_blit_framebuffer
23:27Run the game to see that it just workedβ
23:27Run the game to see that it just workedβ
23:27Run the game to see that it just workedβ
23:49handmade_opengl.cpp: Re-enable the Z-buffer in OpenGLRenderCommands()
23:49handmade_opengl.cpp: Re-enable the Z-buffer in OpenGLRenderCommands()
23:49handmade_opengl.cpp: Re-enable the Z-buffer in OpenGLRenderCommands()
29:32Consider which Image Format to use5
29:32Consider which Image Format to use5
29:32Consider which Image Format to use5
33:25Run the game to see that we have a depth buffer and multisample antialiasing, but that our colours are wrong
33:25Run the game to see that we have a depth buffer and multisample antialiasing, but that our colours are wrong
33:25Run the game to see that we have a depth buffer and multisample antialiasing, but that our colours are wrong
36:41handmade_opengl.cpp: Make OpenGLRenderCommands() correctly iterate over the render targets
36:41handmade_opengl.cpp: Make OpenGLRenderCommands() correctly iterate over the render targets
36:41handmade_opengl.cpp: Make OpenGLRenderCommands() correctly iterate over the render targets
37:57Determine that we are unable to set sRGB texture rendering on this graphics card
37:57Determine that we are unable to set sRGB texture rendering on this graphics card
37:57Determine that we are unable to set sRGB texture rendering on this graphics card
39:21win32_handmade.cpp: Prevent Win32SetPixelFormat() from setting the depth bits
39:21win32_handmade.cpp: Prevent Win32SetPixelFormat() from setting the depth bits
39:21win32_handmade.cpp: Prevent Win32SetPixelFormat() from setting the depth bits
41:32Run the game to see that the depth buffering is still working just fine
41:32Run the game to see that the depth buffering is still working just fine
41:32Run the game to see that the depth buffering is still working just fine
42:21Why we did the multisample
42:21Why we did the multisample
42:21Why we did the multisample
45:04View the cutscene and note that the projection and sRGB are incorrect
45:04View the cutscene and note that the projection and sRGB are incorrect
45:04View the cutscene and note that the projection and sRGB are incorrect
46:52Blackboard: Our rendering pipeline
46:52Blackboard: Our rendering pipeline
46:52Blackboard: Our rendering pipeline
54:20Blackboard: Using a Z-bias to cheat the values passed to the depth buffer
54:20Blackboard: Using a Z-bias to cheat the values passed to the depth buffer
54:20Blackboard: Using a Z-bias to cheat the values passed to the depth buffer
58:41Blackboard: Object placement matrix
58:41Blackboard: Object placement matrix
58:41Blackboard: Object placement matrix
1:00:58handmade_render_group.h: Add a ZBias to render_entry_bitmap
1:00:58handmade_render_group.h: Add a ZBias to render_entry_bitmap
1:00:58handmade_render_group.h: Add a ZBias to render_entry_bitmap
1:03:09Run the game to see disastrous results and explain why
1:03:09Run the game to see disastrous results and explain why
1:03:09Run the game to see disastrous results and explain why
1:04:24handmade_render_group.cpp: Make PushBitmap() set the ZBias and run the game to see everybody sucked out to infinity and beyond
1:04:24handmade_render_group.cpp: Make PushBitmap() set the ZBias and run the game to see everybody sucked out to infinity and beyond
1:04:24handmade_render_group.cpp: Make PushBitmap() set the ZBias and run the game to see everybody sucked out to infinity and beyond
1:05:25handmade_render_group.cpp: Make PushBitmap() compute the ZBias in proportion to the Height
1:05:25handmade_render_group.cpp: Make PushBitmap() compute the ZBias in proportion to the Height
1:05:25handmade_render_group.cpp: Make PushBitmap() compute the ZBias in proportion to the Height
1:06:07A few introductory words on shaders
1:06:07A few introductory words on shaders
1:06:07A few introductory words on shaders
1:09:32Creating shaders in OpenGL6
1:09:32Creating shaders in OpenGL6
1:09:32Creating shaders in OpenGL6
1:12:57handmade_opengl.cpp Remove OpenGLSetScreenspace()
1:12:57handmade_opengl.cpp Remove OpenGLSetScreenspace()
1:12:57handmade_opengl.cpp Remove OpenGLSetScreenspace()
1:13:22handmade_opengl.cpp: Introduce OpenGLCreateProgram() in conjunction with docs.GL7,8,9,10,11,12
1:13:22handmade_opengl.cpp: Introduce OpenGLCreateProgram() in conjunction with docs.GL7,8,9,10,11,12
1:13:22handmade_opengl.cpp: Introduce OpenGLCreateProgram() in conjunction with docs.GL7,8,9,10,11,12
1:21:31Summarise the shader creation process
1:21:31Summarise the shader creation process
1:21:31Summarise the shader creation process
1:22:52win32_handmade.cpp: Bind the shader functions we need13
1:22:52win32_handmade.cpp: Bind the shader functions we need13
1:22:52win32_handmade.cpp: Bind the shader functions we need13
1:32:47Compile and run to see our crazy w coordinate
1:32:47Compile and run to see our crazy w coordinate
1:32:47Compile and run to see our crazy w coordinate
1:33:56Introduce handmade_opengl.h
1:33:56Introduce handmade_opengl.h
1:33:56Introduce handmade_opengl.h
1:36:18handmade_opengl.cpp: Make OpenGLInit() call OpenGLCreateProgram(), and write here docs for Header, Vertex and Fragment code
1:36:18handmade_opengl.cpp: Make OpenGLInit() call OpenGLCreateProgram(), and write here docs for Header, Vertex and Fragment code
1:36:18handmade_opengl.cpp: Make OpenGLInit() call OpenGLCreateProgram(), and write here docs for Header, Vertex and Fragment code
1:41:57Run the game to find that we got through the compilation phase okay, and determine to enable OpenGLCreateProgram() to perform error handling
1:41:57Run the game to find that we got through the compilation phase okay, and determine to enable OpenGLCreateProgram() to perform error handling
1:41:57Run the game to find that we got through the compilation phase okay, and determine to enable OpenGLCreateProgram() to perform error handling
1:44:21handmade_opengl.cpp: Enable OpenGLCreateProgram() to log shader info and assert on validation failure14,15,16,17,18
1:44:21handmade_opengl.cpp: Enable OpenGLCreateProgram() to log shader info and assert on validation failure14,15,16,17,18
1:44:21handmade_opengl.cpp: Enable OpenGLCreateProgram() to log shader info and assert on validation failure14,15,16,17,18
1:53:23Compile and step into OpenGLCreateProgram() to see that we pass shader validation
1:53:23Compile and step into OpenGLCreateProgram() to see that we pass shader validation
1:53:23Compile and step into OpenGLCreateProgram() to see that we pass shader validation
1:55:06Q&A
1:55:06Q&A
1:55:06Q&A
1:55:13fr0styninja Cam died
1:55:13fr0styninja Cam died
1:55:13fr0styninja Cam died
1:56:05soysaucethekid For some of the OpenGL function typedefs, you have the WINAPI entrypoint and others don't. I thought it was necessary to have it or else you get run-time errors when calling those functions (or at least I did)
1:56:05soysaucethekid For some of the OpenGL function typedefs, you have the WINAPI entrypoint and others don't. I thought it was necessary to have it or else you get run-time errors when calling those functions (or at least I did)
1:56:05soysaucethekid For some of the OpenGL function typedefs, you have the WINAPI entrypoint and others don't. I thought it was necessary to have it or else you get run-time errors when calling those functions (or at least I did)
1:57:13thesizik Instead of Z-bias, why not make the sprite cards stand up at a steeper angle, and make them trapezoidal to undo the perspective foreshortening?
1:57:13thesizik Instead of Z-bias, why not make the sprite cards stand up at a steeper angle, and make them trapezoidal to undo the perspective foreshortening?
1:57:13thesizik Instead of Z-bias, why not make the sprite cards stand up at a steeper angle, and make them trapezoidal to undo the perspective foreshortening?
1:58:14bimbinel When you started writing the placeholder shader code you mentioned something about “C++ ??? docs” that are not yet fully implemented. What is this feature exactly?19
1:58:14bimbinel When you started writing the placeholder shader code you mentioned something about “C++ ??? docs” that are not yet fully implemented. What is this feature exactly?19
1:58:14bimbinel When you started writing the placeholder shader code you mentioned something about “C++ ??? docs” that are not yet fully implemented. What is this feature exactly?19
2:01:36pepevel Do you think the Google's angle library (that translates OpenGL to DirectX calls) would solve the sRGB problem on your graphics card?
2:01:36pepevel Do you think the Google's angle library (that translates OpenGL to DirectX calls) would solve the sRGB problem on your graphics card?
2:01:36pepevel Do you think the Google's angle library (that translates OpenGL to DirectX calls) would solve the sRGB problem on your graphics card?
2:02:24gunstarrhero Why are you downsizing 8 pixels into one using blit and not using 32 bit math and rendering 6 back into 2 with a subtract to finalize 8? 2 pass out of 8 bit back to render allows alpha on/off values and colour value attach. ( A|C| instead of colour value) where alpha belongs in blit, define each pixel
2:02:24gunstarrhero Why are you downsizing 8 pixels into one using blit and not using 32 bit math and rendering 6 back into 2 with a subtract to finalize 8? 2 pass out of 8 bit back to render allows alpha on/off values and colour value attach. ( A|C| instead of colour value) where alpha belongs in blit, define each pixel
2:02:24gunstarrhero Why are you downsizing 8 pixels into one using blit and not using 32 bit math and rendering 6 back into 2 with a subtract to finalize 8? 2 pass out of 8 bit back to render allows alpha on/off values and colour value attach. ( A|C| instead of colour value) where alpha belongs in blit, define each pixel
2:03:24insofaras You can pass NULL as the length param to glShaderSource and it treats all the strings as null terminated
2:03:24insofaras You can pass NULL as the length param to glShaderSource and it treats all the strings as null terminated
2:03:24insofaras You can pass NULL as the length param to glShaderSource and it treats all the strings as null terminated
2:03:35handmade_opengl.cpp: Make OpenGLCreateProgram() pass NULL to glShaderSource()
2:03:35handmade_opengl.cpp: Make OpenGLCreateProgram() pass NULL to glShaderSource()
2:03:35handmade_opengl.cpp: Make OpenGLCreateProgram() pass NULL to glShaderSource()
2:04:44fr0styninja Can't we just adjust gamma in the shaders?
2:04:44fr0styninja Can't we just adjust gamma in the shaders?
2:04:44fr0styninja Can't we just adjust gamma in the shaders?
2:05:27fr0styninja Regarding checking shaders status. Believe best practice is checking GL_COMPILE_STATUS after compiling a shader and then GL_LINK_STATUS after linking a program
2:05:27fr0styninja Regarding checking shaders status. Believe best practice is checking GL_COMPILE_STATUS after compiling a shader and then GL_LINK_STATUS after linking a program
2:05:27fr0styninja Regarding checking shaders status. Believe best practice is checking GL_COMPILE_STATUS after compiling a shader and then GL_LINK_STATUS after linking a program
2:06:25bimbinel Are you eventually going to move shader code into the asset packs, or are you going to keep it inline?
2:06:25bimbinel Are you eventually going to move shader code into the asset packs, or are you going to keep it inline?
2:06:25bimbinel Are you eventually going to move shader code into the asset packs, or are you going to keep it inline?
2:06:45thesizik Won't there still be problems if a tree is in front of a tall block, if the sprite still technically intersects the tile above?
2:06:45thesizik Won't there still be problems if a tree is in front of a tall block, if the sprite still technically intersects the tile above?
2:06:45thesizik Won't there still be problems if a tree is in front of a tall block, if the sprite still technically intersects the tile above?
2:08:04aceflameseer Will you implement shader "hotloading"?
2:08:04aceflameseer Will you implement shader "hotloading"?
2:08:04aceflameseer Will you implement shader "hotloading"?
2:10:01enemymouse Hotloading seems safest with the use of BindAttribLocation, correct, so as not to have to chase locations all over the place?
2:10:01enemymouse Hotloading seems safest with the use of BindAttribLocation, correct, so as not to have to chase locations all over the place?
2:10:01enemymouse Hotloading seems safest with the use of BindAttribLocation, correct, so as not to have to chase locations all over the place?
2:10:46xyane Last time I was here you talked about the int32x types. What are your thoughts on type space vs cache utilization?
2:10:46xyane Last time I was here you talked about the int32x types. What are your thoughts on type space vs cache utilization?
2:10:46xyane Last time I was here you talked about the int32x types. What are your thoughts on type space vs cache utilization?
2:12:17ratchetfreak If you recreate the program when hot reloading, you should probably free the old shaders and program
2:12:17ratchetfreak If you recreate the program when hot reloading, you should probably free the old shaders and program
2:12:17ratchetfreak If you recreate the program when hot reloading, you should probably free the old shaders and program
2:13:52abarishu Are those programs cleared automatically when the game exits?
2:13:52abarishu Are those programs cleared automatically when the game exits?
2:13:52abarishu Are those programs cleared automatically when the game exits?
2:14:43macielda Do you have opinions about Temporal AA?
2:14:43macielda Do you have opinions about Temporal AA?
2:14:43macielda Do you have opinions about Temporal AA?
2:14:52xyane I assume that you dont give much thought to how hot data is? I remember a talk by Andrei that you could get a few percent speed up just from organizing the data according to hotness
2:14:52xyane I assume that you dont give much thought to how hot data is? I remember a talk by Andrei that you could get a few percent speed up just from organizing the data according to hotness
2:14:52xyane I assume that you dont give much thought to how hot data is? I remember a talk by Andrei that you could get a few percent speed up just from organizing the data according to hotness
2:17:04abarishu "Unless there is a bug in the driver or in Windows..." Yeah, there are never any bugs in those
2:17:04abarishu "Unless there is a bug in the driver or in Windows..." Yeah, there are never any bugs in those
2:17:04abarishu "Unless there is a bug in the driver or in Windows..." Yeah, there are never any bugs in those
2:18:14xyane Will you eventually be doing such a pass over Handmade Hero?
2:18:14xyane Will you eventually be doing such a pass over Handmade Hero?
2:18:14xyane Will you eventually be doing such a pass over Handmade Hero?
2:18:32pepevel Should you add a \n at the end of each line with the format you are using? Wouldn't it be parsed by OpenGL as a long comment as it is now?
2:18:32pepevel Should you add a \n at the end of each line with the format you are using? Wouldn't it be parsed by OpenGL as a long comment as it is now?
2:18:32pepevel Should you add a \n at the end of each line with the format you are using? Wouldn't it be parsed by OpenGL as a long comment as it is now?
2:19:44starchypancakes Hey Casey, I got a job as a gameplay programmer! Wouldn't have happened without this stream, not in a million years
2:19:44starchypancakes Hey Casey, I got a job as a gameplay programmer! Wouldn't have happened without this stream, not in a million years
2:19:44starchypancakes Hey Casey, I got a job as a gameplay programmer! Wouldn't have happened without this stream, not in a million years
2:20:23A few words on gameplay programming
2:20:23A few words on gameplay programming
2:20:23A few words on gameplay programming
2:22:37Wrap the rest of the stream up with well wishes for starchypancakesγ
2:22:37Wrap the rest of the stream up with well wishes for starchypancakesγ
2:22:37Wrap the rest of the stream up with well wishes for starchypancakesγ