View Full Version : X Windows desktop
tbc++
07-07-2004, 12:07 PM
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++
amendol
07-07-2004, 12:23 PM
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.
tbc++
07-07-2004, 12:30 PM
If I wanted to display it on both, could I create a batch script and run the program twice, once for each display.
tbc++
I think XOpenDisplay allows to specify which display to connect on. man could help you more.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.