Jump to content
  • Advertisement
Sign in to follow this  
stella1016

OpenGL Unrecognized OpenGL version

This topic is 3047 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 am using qt (+opengl) to implement a program. I need to test it on different OS. It has problem in Fedora 12 and Ubuntu 9.10. The terminal shows "Unrecognized OpenGL version", and the display is frozen. I checked the opengl version on different OS. The OSs which are working have lower opengl version. for example: OpenSUSE 10.3 32bit: server glx version string: 1.2 client glx version string: 1.4 OpenGL version string: 1.4 (2.1 Mesa 7.0.1) The OS which doesn't work: Ubuntu 9.10 32bit: server glx version string: 1.2 client glx version string: 1.4 OpenGL version string: 2.1 ( Mesa 7.6) OpenGL shading language version string: 1.20 Fedora 12 32bit: server glx version string: 1.2 client glx version string: 1.4 OpenGL version string: 2.1 Mesa 7.7-devel OpenGL shading language version string: 1.20 I am thinking about the problem might be: higher opengl version doesn't support my program. Am I right? Does anyone know the solution? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
I found some hint in OpenGL website:
--------------
23.040 How can I code for different versions of OpenGL?

Because a feature or extension is available on the OpenGL development environment you use for building your app, it doesn't mean it will be available for use on your end user's system. Your code must avoid making feature or extension calls when those features and extensions aren't available.

When your program initializes, it must query the OpenGL library for information on the OpenGL version and available extensions, and surround version- and extension-specific code with the appropriate conditionals based on the results of that query. For example:

#include <stdlib.h> ... int gl12Supported; gl12Supported = atof(glGetString(GL_VERSION)) >= 1.2; ... if (gl12Supported) { // Use OpenGL 1.2 functionality }
--------------

What is the difference between Opengl version 1.4 and 2.1??

Share this post


Link to post
Share on other sites
The main difference between them is that OpenGL 2.1 has buffer objects and shaders and is much more up-to-date. It is what most of the hardware in the wild supports, too.

It is fully backwards compatible with version 1.4 unlike the more recent versions, such as 3.3 and 4.0. Those more recent versions add features that are only found in the more recent GPUs and drop functionality which is not supported in hardware any more.
The 3.0 and 3.1 versions are "in between" as they still do support old features, but consider them deprecated.

Share this post


Link to post
Share on other sites
But still, I have problem with my application.

I compiled my application in OpenSUSE 10.3, and executed it in Ubuntu 9.10. The problem comes only in Ubuntu 9.10, and the difference I could find is opengl version. If opengl 2.1 is backwards compatible, I don't know why the problem comes....

Share this post


Link to post
Share on other sites
That message means Qt couldn't parse the version string from OpenGL (glGetString(GL_VERSION)), probably because it's malformed, and that would be a driver bug.

You can check how that message is triggered here

Share this post


Link to post
Share on other sites
Are the appropriate drivers installed? What is the vendor string? Mesa appearing in the output you have posted makes me believe you are using the software rasterizer. I use Qt for my OpenGL applications on Ubuntu 9.4 and 9.10 and I had no problems with the NVidia drivers installed.

Qt seems to expects the version string to look like for example "1.4" but not like "1.4 (2.1 Mesa 7.0.1)". NVidia and ATI drivers actually return in the expected format.

Share this post


Link to post
Share on other sites
OK, sth I missed to mention.
I am running my OS in VM.

But I tested 'real' OS of Ubuntu 9.10 as well. There I got more strange result: one account is with OpenGL version 1.4 (my app works), another account with 2.1 (my app not working). The hardware is the same. How could this happen? Install additional libs?

Share this post


Link to post
Share on other sites
Quote:
Original post by stella1016
With the NVidia drivers installed, my collegue's machine also works.

So the driver is a must for my app? What if on VM?


VMs have limited support for hardware accelerated graphics, VirtualBox for example has some DX/GL drivers for Windows (as guest OS).
OpenGL is an API to make use of the GPU, when no hardware acceleration is available why would you want to use OpenGL? Well, if needed there is Mesa, a software implementation (much slower than hardware). You could try making Qt parse the GL version that is returned by Mesa.

Share this post


Link to post
Share on other sites
But why this differs for different version of Ubuntu (all based on VM)? Other OS doesn't have the real hardware to support, but they worked, and this Ubuntu 9.10 doesn't.

I am thinking about some init error of my app....

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!