Jump to content
  • Advertisement
Sign in to follow this  
goku_1

OpenGL some primary query about quake3 source code

This topic is 3740 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm a beginner of OpenGl, these last few day I read quake 3 source code, now I have some question about it. I find the program's OpenGl function all is like qglColor3f(), qglBegin(), and I know these function is defined in qgl.h, but I don't understand why it is, let it look good? Who can give me some article or material to help me read quake 3 source code? Thank you very much for help me :)

Share this post


Link to post
Share on other sites
Advertisement
They are loading the opengl32.dll dynamically and getting the function pointers with GetProcAddress(). For the function pointers, they just decided to have a different name than the standard GL function names in order to avoid problems with respect to the declarations made in gl.h.

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
They are loading the opengl32.dll dynamically and getting the function pointers with GetProcAddress(). For the function pointers, they just decided to have a different name than the standard GL function names in order to avoid problems with respect to the declarations made in gl.h.



In your opinion, Quake3 is use dynamically loading the opengl32.dll, in other words it not use like #pragma(lib, "opengl32") or set up compiler? why the quake3 author do it?

Share this post


Link to post
Share on other sites
IIRC it was entirely for compatibility across drivers. At the time that the game was released (1999), OpenGL support was fairly spotty, so id couldn't rely on the library they link against to be fully available on every machine.

You have to load extensions that way anyway, perhaps they figured it would be worthwhile to put forth the extra effort to standardize on it and dynamically load all of OpenGL.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!