Accessing mesa's OpenGL 2.1 features

I’m on a fairly fresh and up-to-date Debian/Lenny install on a Thinkpad X40.

If I run some OpenGL code in an “OSMesa” context, glGetString(GL_VERSION) returns “2.1 Mesa 7.0.4”, and glGetString(GL_EXTENSIONS) shows various “shader” extensions, and “offscreen mesa” will run my GLSL code and render it correctly into a memory buffer. Fantastic!

If I try and run the same code in a GLUT-created context, GL_VERSION gives “1.3 Mesa 7.0.4” and I don’t see any shader extensions and calling e.g glCreateShader fails, having triggered a “Mesa 7.0.4 implementation error: User called no-op dispatch function (an unsupported extension function?)” message. I get the same sort of problem running the code in a Qt QGLWidget.

How can I get mesa to provide it’s nifty OpenGL 2.0+ features for stuff rendering to the screen ? Or is there some missing bit of GLX-mesa plumbing which means it’s not possible (yet) ?

Thanks for any help or insight into what’s going on

Aha: cracked it…

The system was set up to use the DRI i915 drivers for the onscreen OpenGL, but doing

aptitude install libgl1-mesa-swx11 libgl1-mesa-swx11-dev libgl1-mesa-dri-

(and restarting) swaps to use software mesa rendering for X11 OpenGL apps and they can get at all the yummy 2.0 goodness (GLSL etc). It’s not exactly fast, but it is convenient to be able to do OpenGL 2.0 development on an old lappy.

I hadn’t actually appreciated mesa included any HW support at all until now.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.