I’m writing a program that graphs large amounts of data from an ocean/atmosphere simulation. It can be used to scroll down to see different layers of the ocean, and to scroll across time. My problem is that the program works fine on my computer at work (which runs Fedora 7), but when I run it on my home laptop (also Fedora 7) the animations work very slowly, and I get this funky error message:
“freeglut (./a.out): Unable to create direct context rendering for window ‘’
This may hurt performance.”
No duh it’s hurting my performance. What can I do to make the program run smoothly?
It is probably defaulting to a Mesa software renderer.
Install the Lunix OpenGL graphics drivers for your laptop graphics card and try again.
Direct rendering means a couple of things on one level (and the REAL meaning) it is using a direct rendering call dispatch that avoids encoding & passing all OpenGL draw calls & data via the GLX extension protocol to X, the other meaning is the Direct Rendering Infrastructure which is one native mechanism for supporting direct rendering on Linux (the Open Source one as opposed to NVIDIA’s proprietary system). So Direct Rendering is both an indicator of hardware acceleration via installed drivers and direct dispatch to a local display driver bypassing GLX cruft. It is possible to have hardware acceleration yet still draw via GLX and kill performance, particularly for geometry intensive stuff.
If you have a screwy display setup you may want to sanity check this and all this of course assumes you’re running your app on the Linux laptop system not merely using it as an X server displaying for a remote client application.
e.g.
setenv DISPLAY 0:0
or some similar will typically set your display to your native display server associated with the server your app is running on prior to executing a program.
Make sure that last one doesn’t give you network rendering though. You’re really specifying a networked xserver name but :0.0 is fairly standard for requesting the first display on the local server (applicating server not x server).