View Full Version : "Freeglut Unable to Create Direct Context Rendering"
07-10-2007, 04:17 PM
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?
07-10-2007, 10:50 PM
From my brief experience, a direct context rendering window is a hardware accelerated window.
What hardware (video card) is your laptop? (and have you installed the video drivers for it?)
07-11-2007, 02:02 AM
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.
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.
07-14-2007, 02:50 PM
Thanks for the info, Dorbie.
I tried the setenv DISPLAY command, but now when I run the program it tells me:
freeglut (./a.out): failed to open display '0:0'
07-16-2007, 12:40 AM
My mistake it should be:
setenv DISPLAY :0.0
or if you have a host name:
setenv DISPLAY hostname:0.0
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).
(been too long since I last used this stuff)
07-24-2007, 12:05 PM
I've been messing with this stuff for days and nothing has seemed to work. When I run the command "glxinfo" on Fedora, it tells me:
name of display: :0.0
display: :0 screen: 0
direct rendering: No
That last line is clearly the problem. Is there an easy way to fix this?
07-25-2007, 04:20 AM
Do you have the ATI/NVIDIA drivers with GLX support installed? This drivers provide hardware acceleration.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.