Multiple Pipes & windows

Hi,

I am trying to display images over multiple pipes. Each pipe has its own window and pixel array. I’ve tried switching from pipe to pipe using putenv( DISPLAY :x.y ) (where x.y are numbers corresponding with the position of the pipe). That doesn’t work with openGL, it displays all the windows correctly, but only on one of the pipes. This method worked before when I was using system calls to image tools we have here, but it hasn’t worked since I converted it to openGL. Is there a glut call or something that switches pipes? or is there another way to do it?

Thanks,
Sanjit

Hi,

you need to create a new context on the different pipes. Something like this:

Display *pipes[2];
XVisualInfo *vi[2];

pipes[0]=XOpenDisplay(“localhost:0.0”);
pipes[1]=XOpenDisplay(“localhost:0.1”);
vi[0]=glXChooseVisual(…
/* set up your contexts, one for each display on each pipe */

/* select the first pipe /
glXMakeCurrent(pipes[0], win[0], cx[0]);
/
select the second pipe */
glXMakeCurrent(pipes[1], win[1], cx[1]);

I dont’ know if this will work. Methinks it should, tho’ putenv is only changing what you’d pass to XOpenDisplay().

Hope this helps,

cheers,
John

Thanks for the advice! But we want this to be portable, so we want to avoid glX calls. Anyone else have an idea? Also, I tried this anyways, and the glX calls conflict with glut, because glut wants to set the pipes and displays. I’d have to remove all my glut function calls to make it work.

uh… what? you’re talking about unix pipes, right? Does windows have display pipes? What about macs? Nope and Nope. So, it must be unix you’re talking about, right?

GLX is the OpenGL extension to X-Windows. If you want to run opengl under X, you need GLX. It’s not a portablity constraint.

You don’t HAVE to use GLX under X, but you do if you want to use OpenGL. (Sure, sure, GLUT abstracts over GLX, but that’s a different story). The pipes thing is independent of OpenGL & GLX, btw.

cheers,
John

[This message has been edited by john (edited 08-15-2000).]

oh, and another thing… glut will conflict with GLX because it tries to abstract over it.

cheers,
John

yeah, sorry… I didn’t know what I was saying, the portability issue was for something else I’ve been thinking about.

Thanks…