View Full Version : OpenGL 3.x ATI driver question

08-10-2009, 07:24 AM
Hello, I manually installed the ATI Catalyst 9.7 driver in ubuntu 8.04. I bought the Opengl Red book Seventh edition (OpenGL 3.0 and 3.1 version book).

Now i want to start programming with the 3.x version but:

dani@Zeus:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon HD 3400 Series
OpenGL version string: 2.1.8787

Well why in OpenGLg version string is 2.1? ATI catalyst 9.7 should support opengl 3.0 version, isn't it?

I am new to this linux world but what i have to do to change it to 3.x version?

Thank you for helping me and sorry for my english ^^U.

08-10-2009, 08:04 AM
To use OpenGL 3, you need to create OpenGL context in special way: http://opengl.org/wiki/Getting_started#OpenGL_3.0

08-10-2009, 08:15 AM
Thanks for your reply but this only makes me more confused now :o

I always used the GL/gl.h header file to program OGL 2.1 apps.
Now, which header should i have to use? And the main question.. new functions will run in my Graphics card?

I ask this because in:

dani@Zeus:~$ fglrxinfo
display: :0.0 screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Mobility Radeon HD 3400 Series
OpenGL version string: 2.1.8787

it says 2.1.. :S

08-10-2009, 09:10 AM
fglrxinfo does not show anything above OpenGL 2.1.
Don't worry about fglrxinfo.

The driver supports OpenGL 3.0 (and beta OpenGL 3.1). You have to make an OpenGL 3.x context like martinsm said (just use the same headers you always do).

08-10-2009, 09:32 AM
Ok Heiko thank you i will investigate what is this context i have to create.

The last question (I think :D), i'm using freeglut and SDL(only for input) in my projectes. Will I need to make changes in future projects?

No my project include looks like this:

#include <GL/freeglut.h>
#include <SDL/SDL.h>

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

And my link libs are:

-lSDLmain -lSDL -lglut

I'm doing it right?

Thank you!!

08-10-2009, 09:56 AM
I'm not sure about SDL and Freeglut. I think you have to write your own code for creating an OpenGL window that has OpenGL 3.x support (see link provided by martinsm). Perhaps SDL/freeglut has support for OpenGL 3.x already, but I don't think so.

08-10-2009, 09:56 AM
Why do you use SDL and freeglut in same project?

For SDL to create GL3 context, you need to be using SDL 1.3 version that can be obtained from SVN sources. 1.2 version doesn't know how to create GL3 context.

Freeglut afaik also needs to be compiled from latest SVN sources to get GL3 support.

Both of them has example programs for GL3 context creation and usage.

08-10-2009, 10:04 AM
ATI Catalyst 9.7 drivers are drivers of september 2007 (9 - 7, nice ATI convention!) so no it isn't supposed to suported OpenGL 3.

Update your drivers with recent one and you may have a chance ...

08-10-2009, 10:08 AM
Actually 9.7 drivers are from 2009.july (9 for year, and 7 for month) - they are currently the latest drivers available from ATI: http://game.amd.com/us-en/drivers_catalyst.aspx

Next drivers probably will be 9.8 drivers somewhere around this month (8=august).

Here is list of older Catalyst driver releases: http://ati.amd.com/products/catalyst/versions.html

08-10-2009, 10:19 AM
My mistake! what I was thinking!

And by the way, SDL 1.3 doesn't build with VC 8 ... :p

08-10-2009, 10:20 AM
Yes, 9.7 are the current latest drivers..

Well i'm using SDL because i did 2 "games" with it. I only use from SDL the input functions. Then I use freeglut to handle and create the window.

But i'm the newbie here, so which lib do you recommend me?

08-10-2009, 10:34 AM
I really that will work (using SDL for input and freeglut for window). Use SDL for everything.

I would recommend SDL over freeglut. It has much more possibilities and more platforms where it runs. I'm building SDL 1.3 from SVN myself on VC2008.

08-10-2009, 10:42 AM
Well then i will use only SDL :).

Now i will try to build 1.3 for my ubuntu 8.04 hehehe because yes, it have opengl 3.0 support.

08-10-2009, 10:48 AM
Whouhou! It built! I updated my DX SDK to the lastest version and it works.
How do you create an OpenGL 3 context with SDL? It is automatique or there is something to do?

08-10-2009, 10:58 AM
now im building it xD. Then i will search how to create the opengl 3 context :D.

BTW, all of you are usign windows?

08-10-2009, 11:30 AM

I have this error when i compiled:

g++ -lSDLmain -lSDL -lGL -lGLU -o dist/Debug/GNU-Linux-x86/opengl3 build/Debug/GNU-Linux-x86/welcome.o
/usr/local/lib/libSDL.so: undefined reference to `nativeClear32'
/usr/local/lib/libSDL.so: undefined reference to `nativeTestThenSet32'

Someone got the same error?

08-10-2009, 01:28 PM
How do you create an OpenGL 3 context with SDL?

You set GL attributes SDL_GL_CONTEXT_MAJOR_VERSION and SDL_GL_CONTEXT_MINOR_VERSION to 3 and 0 (or 1) accordingly before creating OpenGL context:


I do not know about SDL on linux - never have build or used it there. Maybe try SDL mailing list.

08-11-2009, 02:06 AM
Works perfectly fine now for me thanks!