Jump to content
  • Advertisement
Sign in to follow this  
tuket

OpenGL Write old opengl or new OpenGL?

This topic is 2146 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

Hi everyone. I am new to OpenGL and also to this forum.

I wanted to know which are the benefits of using the newest specifications of OpenGL. Is it not better to use the older versions so more computers are able to run my game?

I ask this because I have been reading this online book Learning Modern 3D Graphics Programming and it uses newer version of OpenGL than mine and I can not even compile the examples.

Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

You can still use GL 2.1 and not use the deprecated functionality. Ie, use your own/3rd party math/matrix lib... Use VAO/VBO shaders, etc.

Share this post


Link to post
Share on other sites
The benefit to using modern OpenGL is that it will work on most computers (phones, tablets etc), whereas the decades-old version won't.

Share this post


Link to post
Share on other sites

The benefit to using modern OpenGL is that it will work on most computers (phones, tablets etc), whereas the decades-old version won't.

Oh, really? I didn't know that, in fact, I thought it was the other way around(that older versions where more portable).

Then I wonder why I culdn't compile the examples of the book I said.

I get this error message:

tut1.cpp:10:32: error fatal: glload/gl_3_2_comp.h: No existe el archivo o el directorio

Which means that the file or folder doesn't exist.

Thanks for the answer!

Share this post


Link to post
Share on other sites

I'd guess modern OpenGL is far better - in terms of both, support and writing in it.

 

Anyways having OpenGL 2.1 seems like you're having either old integrated GPU, or something is terribly wrong with your graphics drivers.Can you tell us what GPU/drivers do you use?

Share this post


Link to post
Share on other sites

I don't use any IDE I use g++ under ubuntu 13.

The version of OpenGL is 2.1.

Thanks!

 

It doesn't have to be an IDE; if the path to the gl headers isn't set up correctly in your environment variables or makefile you'll still get a similar error.

 

Note that here we're talking about a pure software concept - compiling code - and that has absolutely nothing whatsoever to do with which version of OpenGL your hardware supports (and always remember that OpenGL is not software).  It's possible to compile OpenGL 4.4 code on hardware that only supports 1.1, and vice-versa.

Share this post


Link to post
Share on other sites

I don't use any IDE I use g++ under ubuntu 13.
The version of OpenGL is 2.1.
Thanks!

If you're seeing OpenGL 2.1 on Ubuntu 13.04 or 13.10 it's because you're looking at the Mesa drivers. Turns out they lie, they actually secretly support at least GLX+OpenGL 4.1 and EGL+OpenGL|ES 1.3. Of course, the runtime is provided by the DRI2 drivers for your hardware even if you compile against Mesa.

You might enjoy knowing that the Ubuntu Unity stack (the desktop shell) is built on those same Mesa bindings, using only OpenGL 2.1.4 with extensions (vertex and fragment shaders and VBOs and some texture extensions) or OpenGL|ES 2.1.4. That's the sweet spot for portability. Older than that, it won't work on mobile hardware and newer than that it won't work on netbooks and old machines.

For full portability, what you really want to do is use an extension wrangler, like Glew.

Share this post


Link to post
Share on other sites

Then I wonder why I culdn't compile the examples of the book I said.

I get this error message:

That error message implies you have not installed the prerequisite libraries as described in the "Building the Tutorials" chapter of that book. The SDK required for the tutorials should contain the file glload/gl_3_2_comp.h.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!