Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm going to buy an OpenGL book from Amazon but there are different versions for OpenGL 2, 3 and 4. Which one does G++ use?

share|improve this question
add comment

3 Answers

g++ is the C++ compiler of the GNU Compiler Collection (GCC). The compiler itself does not come with any OpenGL library.

You download OpenGL development libraries from the repository then you compile your program.

To get the OpenGL development library is in the package libgl1-mesa-dev. It has support for OpenGL 2.1 and some of the extensions from OpenGL 3. The next version of Mesa will likely support OpenGL 3.

To fetch it run sudo apt-get install libgl1-mesa-dev.

share|improve this answer
add comment

This does not actually depend on your compiler, but on the type of OpenGL library you are using. On *ubuntu, you may want to use the free mesa library, which is availiable in the package repositories (look for libgl1-mesa-dev). I recommend installing the freeglut package, which additionally provides some really good tools working with opengl.

According to the release notes, mesa currently (v. 7.11) supports OpenGL 2.1 as well as some extensions from level 3 and 4.

Also, make sure that your graphics card supports the version of the standard. While OpenGL 3 is supported by most graphics cards today, OpenGL 4 is only available on modern cards.

share|improve this answer
add comment

I'm thinking there are no OpenGL1; 2; 3; 4.. I only now OpenGL; OpenHL; OpenCL; OpenAL; OpenClusterGL; OpenXL. But: Open__ is only a special 3D-Renderer. So you can config it whit the videocart-driver. I'm not shure and information are from the Internet, so.....NO WARANTY!!!

share|improve this answer
    
This is difficult to understand. Please elaborate. –  hexafraction Jul 19 '12 at 12:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.