[video output=day235 member=cmuratori stream_platform=twitch stream_username=handmade_hero project=code title="Initializing OpenGL on Windows" vod_platform=youtube id=5Klc9RZPG7M annotator=Miblo]
[0:53][handmade.h: Consult the TODO list]
[4:02][win32_handmade.cpp: Promote hardware acceleration to the top of the TODO list and embark on it]
[5:55][Run the game and note the weird fade thing]
[6:58][Set the stage for OpenGl]
[8:33][build.bat: Link to opengl32.lib]
[9:40][win32_handmade.cpp: #include opengl32.h>]
[13:06][win32_handmade.cpp: Introduce Win32InitOpenGL]
[15:30][Blackboard: OpenGL on Windows]
[23:22][Blackboard: "DC" -> Device Context]
[28:49][win32_handmade.cpp Write Win32InitOpenGL]
[31:55][win32_handmade.cpp: Disable Win32DisplayBufferInWindow]
[32:39][win32_handmade.cpp: Insert some OpenGL in this function]
[37:28][Run the game and note that "we have no such pink screen to speak of"][quote 351]
[37:49][win32_handmade.cpp: Call Win32InitOpenGL, run the game and hit an InValidCodePath]
[38:28][Internet: PIXELFORMATDESCRIPTOR[ref
    site="MSDN"
    page="PIXELFORMATDESCRIPTOR"
    url="https://msdn.microsoft.com/en-us/library/dd368826.aspx"]]
[44:08][win32_handmade.cpp: Initialise this struct]
[56:19][Q&A][:speech]
[56:29][@pragmascrypt][Funny the pink didn't show up on the stream. OBS problem?]
[56:35][@Connor_Rentz][We all just saw a black screen, not a pink screen...]
[57:03][@cubercaleb][According to this you should use 32 for the ColorBit[ref
    site="OpenGL"
    page="Creating an OpenGL Context"
    url="https://www.OpenGL.org/wiki/Creating_an_OpenGL_Context_%28WGL%29"]]
[57:58][@garryjohanson][Curious if the CPU or the GPU actually communicates the information to the screen. I feel you mentioned this, but I forgot]
[59:01][@1213lac][What are your thoughts about Vulkan?]
[59:14][@sssmcgrath][If you're ever in the mood to do a straight-up unrelated tutorial stream, IO completion ports would be great cause I ain't reading about that ***]
[59:40][@ChaiLatteQuinoa][What do you think of Nvidia GE Force does not clear memory?]
[59:54][@elxenoaizd][Came in late. Do we have our own GL function pointers loaded now?]
[1:00:39][@insofaras][Try a color other than pink? OBS might treat that as transparent]
[1:01:09][@slashac][Do you know why they deprecate GL_ALPHA?]
[1:01:27][@Novynn][You don't need the DescribePixelFormat call, since when you use ChoosePixelFormat it modifies your DesiredPixelFormat with the correct stuff]
[1:02:17][@cubercaleb][Since we will have a depth buffer, does the Z-sort really matter anymore?]
[1:03:12][@Novynn][My bad! Looks like OpenGL docs are lying to me again]
[1:03:22][@Ikkir_Isth][Going to be doing multiple GL versions, or just the minimum for general Win XP machines? (What version are most of them even on anyway?)]
[1:04:08][@Snovind92][Would there be any benifit of using the new versions of OpenGL for a game like Handmade Hero?]
[1:04:30][@MadEqua][Is there a difference when calling a function (like glClear()) on the opengl32.lib vs the one on the graphics driver dll?]
[1:04:46][Blackboard: Code library vs Import library]
[1:06:36][@Quatzequatel][Since we are using OpenGL, will you be modifying our 2.5D'ness or keep the code as is?]
[1:06:49][@evraire][For ChoosePixelFormat() were we not supposed to specify iPixelType and set it to PFD_TYPE_RGBA?]
[1:07:27][win32_handmade.cpp: Set DesiredPixelFormat.iPixelType]
[1:08:14][@angus_holder][So by linking against opengl32.lib we don't need to use GetProcAddress at all with OpenGL?]
[1:08:56][Blackboard: Dynamic link table]
[1:14:56][@1213lac][Since you are complaining about windows pretty often, why don't you use another operating system?]
[1:15:48][@MrSlick1015][Do you think for the OS X port will you need a wrapper written in Objective-C to get use OpenGL and make a window?]
[1:16:20][@garryjohanson][This is probably dumb, but what about offloading much of the computing we are doing onto the GPU using OpenCL, then not use OpenGL and keep things mostly as is?]
[1:17:37][@cubercaleb][Over the break I wrote a program that generates OpenGL function pointer declarations and initialization by scanning cpp/h files to determine what needs to be added. Do you plan on doing something similar for Handmade Hero or will you keep it simple?]
[1:17:54][@slashac][How bad is an if statement in a shader?]
[1:18:13][@Vidster88][Have you ever programmed for a console?]
[1:18:42][@Longboolean][Linux has windows vista beat]
[1:19:50][Wind it down][:speech]
[/video]
