Jump to content
  • Advertisement
Sign in to follow this  
SteveDeFacto

OpenGL What lib/ header files do I include for OpenGL 3?

This topic is 2678 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 made an OpenGL project a long time ago but I barely remember how it works. Now I'm trying to use OpenGL 3 but I can't seem to figure out which lib and header files I need to include. I saw a project which claimed to use OpenGL 3 that included gl\gl.h and gl\glew.h then linked opengl32.lib and glew32.lib but I don't understand how that would be anything other than version 1.1? Please tell me what files to include and link.

Share this post


Link to post
Share on other sites
Advertisement
gl.h and opengl32.lib provides OpenGL 1.1 and an interface to load additional functions from the graphics driver. glew.h and glew32.lib provides the interface for everything newer than OpenGL 1.1, and loads those functions using the interface provided by gl.h and opengl32.lib so you can actually call them in your code.

Note that glew is just one of many libraries to load additional functions. You can even do it yourself if you want. It's all in the Forum FAQ.

Share this post


Link to post
Share on other sites
http://www.opengl.org/wiki/Getting_started#Accessing_OpenGL_functions
http://www.opengl.org/wiki/Getting_started#OpenGL_3.0_and_Above

Share this post


Link to post
Share on other sites

gl.h and opengl32.lib provides OpenGL 1.1 and an interface to load additional functions from the graphics driver. glew.h and glew32.lib provides the interface for everything newer than OpenGL 1.1, and loads those functions using the interface provided by gl.h and opengl32.lib so you can actually call them in your code.

Note that glew is just one of many libraries to load additional functions. You can even do it yourself if you want. It's all in the Forum FAQ.


Oh! That's kinda good and bad i guess. I only have one more question. What is GLU32.lib for? I'm not sure if I need to link to it or not?

EDIT: Never mind, I found it on google.

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!