View Full Version : Problems with Opengl 3.1 context

08-25-2009, 08:48 AM
Hello Everybody.

I'm fighting with a simple opengl-programm for nearly several hours.

I used this tut (http://www.opengl.org/wiki/Tutorial1:_Creating_a_Cross_Platform_OpenGL_3.2_Co ntext_in_SDL_%28C_/_SDL%29) to set up an opengl 3.1 context. I simply changed the version number from 3.2 to 3.1, installed the beta form SDL (libsdl1.3), copied the newest header (gl3.h) and compile. Everything works fine so far.

Ok so i tried this one: Tut2 (http://www.opengl.org/wiki/Tutorial2:_VAOs%2C_VBOs%2C_Vertex_and_Fragment_Sha ders_%28C_/_SDL%29)

During compilation it breaks with the following message:

test.c:(.text+0x1ef): undefined reference to `glGenVertexArrays'
test.c:(.text+0x1fa): undefined reference to `glBindVertexArray'
test.c:(.text+0x511): undefined reference to `glDeleteVertexArrays'
collect2: ld gab 1 als Ende-Status zurück

After switching to the glew-library i was able to compile the example. But the shader-compiler complained about the version-number:

ERROR: 0:1: '' : Version number not supported by GL2

After switching #version 140 to #version 130 the compilation works fine, but there is only a black screen.

I wonder i have really the right driver.
I installed the "ATI Catalyst 9.7 Proprietary Linux x86 Display Driver" under gentoo linux.

But glxinfo still says:

OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 2400 PRO
OpenGL version string: 2.1.8787
OpenGL shading language version string: 1.30


GLEW version 1.5.1
Reporting capabilities of display :0.0, visual 0x29
Running on a ATI Radeon HD 2400 PRO from ATI Technologies Inc.
OpenGL version 2.1.8787 is supported

Someone knows how i get this example running?

My System:
Linux workstation 2.6.29-gentoo-r5
Xorg-Server 1.6.3

08-25-2009, 09:27 AM
I tested the new Catalyst Driver (9.8) and so know i'm able to use
the 140 of GLSL. But i still don't see anything and the src of tut2 still don't compile ;(

08-25-2009, 09:49 AM
Ok guys sorry for posting. I found the mistake. Using glew and


this solve the problem