Results 1 to 7 of 7

Thread: "Freeglut Unable to Create Direct Context Rendering"

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2007
    Posts
    3

    "Freeglut Unable to Create Direct Context Rendering"

    Hello everyone,

    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?

  2. #2
    Senior Member OpenGL Pro sqrt[-1]'s Avatar
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    1,000

    Re: "Freeglut Unable to Create Direct Context Rendering"

    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?)

  3. #3
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: "Freeglut Unable to Create Direct Context Rendering"

    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.

  4. #4
    Junior Member Newbie
    Join Date
    Jul 2007
    Posts
    3

    Re: "Freeglut Unable to Create Direct Context Rendering"

    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'

  5. #5
    Super Moderator OpenGL Guru imported_dorbie's Avatar
    Join Date
    Jul 2000
    Location
    Bay Area, CA, USA
    Posts
    3,966

    Re: "Freeglut Unable to Create Direct Context Rendering"

    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)

  6. #6
    Junior Member Newbie
    Join Date
    Jul 2007
    Posts
    3

    Re: "Freeglut Unable to Create Direct Context Rendering"

    Hello again,

    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?

  7. #7
    Senior Member OpenGL Pro Zengar's Avatar
    Join Date
    Sep 2001
    Location
    Germany
    Posts
    1,931

    Re: "Freeglut Unable to Create Direct Context Rendering"

    Do you have the ATI/NVIDIA drivers with GLX support installed? This drivers provide hardware acceleration.

Similar Threads

  1. "Unable to create context rendering"
    By Rodnower in forum OpenGL: Linux
    Replies: 2
    Last Post: 04-04-2010, 11:32 AM
  2. unable to create direct context rendering
    By Janani in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 03-04-2010, 03:55 AM
  3. Unable to create OPENGL|ES context error 12293
    By mjabasolo in forum OpenGL ES
    Replies: 0
    Last Post: 05-07-2009, 06:28 AM
  4. a freeglut error: Unable to create direct context
    By Jay I in forum OpenGL: Linux
    Replies: 3
    Last Post: 02-06-2008, 06:00 AM
  5. unable to create opengl rendering context
    By in forum OpenGL: User Software
    Replies: 0
    Last Post: 11-27-2001, 12:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean