Question

I'm going through Learning Modern 3D Graphics Programming, and I'm trying to run the "hello, world!" triangle program. However, I get this error:

jason@ubuntu:~/Desktop/Tutorial 0.3.8/Tut 01 Hello Triangle$ ./Tut\ 01\ Main
freeglut (./Tut 01 Main): glXCreateContextAttribsARB not found

Running 'glxinfo' gives me this:

jason@ubuntu:~/Desktop/Tutorial 0.3.8/Tut 01 Hello Triangle$ glxinfo | grep OpenGL
OpenGL vendor string: Tungsten Graphics, Inc
OpenGL renderer string: Mesa DRI Intel(R) Ironlake Mobile 
OpenGL version string: 2.1 Mesa 7.11
OpenGL shading language version string: 1.20
OpenGL extensions:

And a 'lspci' command gives me this:

jason@ubuntu:~/Desktop/Tutorial 0.3.8/Tut 01 Hello Triangle$ lspci | grep "VGA"
00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)

Through a bit of googling, I'm guessing that I'm using OpenGL 2.1 when I should be using OpenGL 3.3 for 'glXCreateContextAttribsARB', though I don't really know. Is there anything I can do?

Was it helpful?

Solution

The glXCreateContextAttribsARB API requires GLX 1.4, and at least OpenGL 3.0 (but really 3.2).

Your GPU driver is reporting it is only capable of OpenGL 2.1, which is consistent with using Mesa 7.x. The latest Mesa 8.x does support OpenGL 3, but you would need to check if it is available for your distro and also supports your particular GPU model.

Bottom line - you might be limited by your hardware and driver to the old 2.1 driver model, which means you can't take advantage of the "Modern" approach. Sorry!

Check the DRI driver status here:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top