Handmade Hero»Forums»Code
102 posts
When does casey load OpenGl function pointers?
Edited by C_Worm on Reason: Initial post
when does casey show how to load OpenGL function pointers?

and does he load all functions he needs in one set or does he load functions more sporadically?

Mārtiņš Možeiko
2381 posts / 2 projects
When does casey load OpenGl function pointers?
He is loading only functions he is using.

Initial GL code was added at day 235. In later days few basic GL function calls were added to draw full screen quad (GL 1.x style). Adding code to load extension GL functions first happens in day 241 (for wglSwapInterval). Look for few next days after that to see how other GL function are loaded. Here's an example for much later in the code (day 370) where many different GL functions are loaded: https://hero.handmade.network/episode/code/day370/#726

Btw there is a really good search for all the days available here: https://hero.handmade.network/episode/code
Asaf Gartner
59 posts
Handmade Network Staff
When does casey load OpenGl function pointers?
There's also a handy annotated source code repository if you have access to the Handmade Hero github.