Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: X Windows desktop

  1. #1
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    21

    X Windows desktop

    If I have a multi-card X windows installation is there a way to set which display my OpenGL program renders on? I think the X devices are named somthing like 0:0, how do I pass that to OpenGL?

    tbc++
    If you died tonight, where would you go?

  2. #2
    Junior Member Regular Contributor
    Join Date
    Aug 2001
    Location
    San Diego, CA
    Posts
    136

    Re: X Windows desktop

    you can do this by setting your "DISPLAY" environment variable. If you have two X servers on localhost, and want to display your GL app on the first then do this:

    export DISPLAY=localhost:0;
    ./glapp;

    on the second,

    export DISPLAY=localhost:1;
    ./glapp;

    "export" is the command you use in the bash shell.

  3. #3
    Junior Member Newbie
    Join Date
    May 2004
    Posts
    21

    Re: X Windows desktop

    If I wanted to display it on both, could I create a batch script and run the program twice, once for each display.

    tbc++
    If you died tonight, where would you go?

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jul 2001
    Location
    France
    Posts
    1,749

    Re: X Windows desktop

    I think XOpenDisplay allows to specify which display to connect on. man could help you more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •