[video output=day238 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Making OpenGL Use Our Screen Coordinates" vod_platform=youtube id=kBuaCqaCYwE annotator=Miblo]
[0:09][Recap and set the stage for the day]
[2:14][Recall how our graphics architecture works at the moment]
[6:44][Run the game and refresh our memory about where we left off]
[9:05][handmade_render_group.cpp: Look at how the renderer currently works and talk about the notion of separating out the renderer]
[13:28][Create handmade_opengl.cpp and translate RenderGroupToOutput into it]
[19:58][handmade_opengl.cpp: Introduce OpenGLRectangle]
[25:47][Blackboard: Maths][quote 355]
[26:21][Blackboard: Projecting the P from clip space to screen space]
[32:27]["Life is hard"][quote 356]
[32:46][Blackboard: Setting up our transformation matrix]
[41:09][win32_handmade.cpp: Write our new OpenGLRectangle function inline, passing it the old values at first]
[43:14][Run the game and see our old bug]
[44:09][Internet: glLoadMatrix[ref
    site="Rutgers"
    page="glLoadMatrix"
    url="http://www.cs.rutgers.edu/~decarlo/428/gl_man/loadmatrix.html"]]
[45:29][win32_handmade.cpp: Initialize Proj array to pass to glLoadMatrix]
[47:25][win32_handmade.cpp: #include handmade_intrinsics.h and handmade_math.h]
[47:54][Run the game and see that everything does not just work]
[48:13][Blackboard: Mathematical vs Computational matrix multiplication]
[53:26][win32_handmade.cpp: Re-encode the Proj array for OpenGL's benefit]
[56:17][Q&A][:speech]
[57:04][@Insobot][I'm gonna start? Yeah i installed a driver software company. Kapp?]
[57:16][@Boorocks998][What keyboard layout do you use?]
[57:27][@cubercaleb][Will handmade_opengl.cpp be included in the platform layer or game layer?]
[59:09][@elxenoaizd][Jumped in a bit late, so are we using the fixed-function OpenGL API right now, or will we write our own matrix struct at some point?]
[59:52][@ozmethod][Wrist braces - recommended for programmers in general, or just something you've had issues with?]
[1:00:07][@cubercaleb][If you include handmade_opengl.cpp in the game layer, won't that force you to include windows.h and all the OpenGL headers in the game layer?]
[1:01:41][@grizzlyninja_][Was push buffer rendering primarily in the software renderer because the real hardware renderer works that way due to GPUs?]
[1:02:16][@Pix1234][Will the game be given away to dev viewers for free?]
[1:02:41][@elxenoaizd][Off-topic: Have you worked with, talked to or met Andre Lamothe before?]
[1:03:06][@LOstTGM][I feel uncomfortable with floating points representing pixels. Have you ever had problems with OpenGL and floating point values, like passing them to shaders, or texture coordinates?]
[1:05:25][@AdiAdiABXze][Do you use any EBO (element buffer object) or VBO (vertex buffer object) in your OpenGL code? If no, why?]
[1:08:35][@LOstTGM][Did you do your own glOrtho call when you set up the projection matrix? Also, thanks for all the matrix explanations]
[1:11:56][Stream has ended][:speech]
[/video]
