Handmade Hero » Forums » Code » When does casey load OpenGl function pointers?
C_Worm
27 posts
#21238 When does casey load OpenGl function pointers?
2 months, 1 week ago Edited by C_Worm on July 8, 2019, 7:11 p.m. 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?

mmozeiko
Mārtiņš Možeiko
1971 posts / 1 project
#21239 When does casey load OpenGl function pointers?
2 months, 1 week ago

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
AsafG
Asaf Gartner
37 posts

Handmade Network Staff

#21240 When does casey load OpenGl function pointers?
2 months, 1 week ago

There's also a handy annotated source code repository if you have access to the Handmade Hero github.
https://github.com/HandmadeHero/a...d/handmade_renderer_opengl_cpp.md