PDA

View Full Version : OpenGL 3.x ATI driver question



RoiiG
08-10-2009, 06: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.

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

RoiiG
08-10-2009, 07: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

Heiko
08-10-2009, 08: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).

RoiiG
08-10-2009, 08: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!!

Heiko
08-10-2009, 08: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.

martinsm
08-10-2009, 08: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.

Groovounet
08-10-2009, 09: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 ...

martinsm
08-10-2009, 09: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

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

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

RoiiG
08-10-2009, 09: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?

martinsm
08-10-2009, 09: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.

RoiiG
08-10-2009, 09: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.

Groovounet
08-10-2009, 09: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?

RoiiG
08-10-2009, 09: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?

RoiiG
08-10-2009, 10:30 AM
Well..

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?

martinsm
08-10-2009, 12: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:

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);


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

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