Two graphics cards

Dear all,

I’ve got two graphics cards and SDL working nicely on one (linux, x11).

Is there a way to tell SDL_VideoInit what screen to use?

Max–
Maximilien J. COLLON

The usual way of telling X11 windows what screen to use: The DISPLAY
environment variable.On Tue, 2004-09-21 at 12:30, Maximilien J. Collon wrote:

Is there a way to tell SDL_VideoInit what screen to use?


Petri Latvala

Hi Petria (and others),

Yes, that’s clear if I just want to have one display on one of the two
screens.

The idea is however to use both displays in a kind of stereo mode, by
having two SDL instances that write to two different outputs. So, it would be
better to set each screen up with SDL_Init and SDL_SetVideoMode, and then
to create two separate YUV overlays, which are used for displaying.

Do I have to change environment variables everytime I update one of the
two screens (if I interpret your answer), or is there a better way to do
that by specifiying the X11 screens with SDL_SetVideo?

Thanks and regards,

Max

Is there a way to tell SDL_VideoInit what screen to use?

The usual way of telling X11 windows what screen to use: The DISPLAY
environment variable.


Petri Latvala


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Quoting Petri Latvala :On Tue, 21 Sep 2004, Petri Latvala wrote:

On Tue, 2004-09-21 at 12:30, Maximilien J. Collon wrote:

On Tue, 2004-09-21 at 12:30, Maximilien J. Collon wrote:

Is there a way to tell SDL_VideoInit what screen to use?

The usual way of telling X11 windows what screen to use: The DISPLAY
environment variable.


Petri Latvala


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hi Petria (and others),

The idea is however to use both displays in a kind of stereo mode, by
having two SDL instances that write to two different outputs.

Neat. Are you doing stereoscopy?

So, it would be
better to set each screen up with SDL_Init and SDL_SetVideoMode, and
then
to create two separate YUV overlays, which are used for displaying.

These are application-wide routines, as so to speak. Calling
SetVideoMode beyond the first time will simply change your video mode.
I’m pretty sure SDL_Init has no problem with you calling it several
times… IIRC, it will skip initializing anything that is already
initialized.

Do I have to change environment variables everytime I update one of the
two screens (if I interpret your answer), or is there a better way to
do
that by specifiying the X11 screens with SDL_SetVideo?

No, you’ll need to run processes and utilize some form of interprocess
communication. If this is an educational project, consider using Unix
sockets. They are probably every bit as good for most purposes as
shared memory, since they take care of streams for you. But sometimes
multiprocess communication isn’t always geared toward streaming data
between the two.

Maybe you’ll even want to use three processes - two to display, one to
control the other two.

Another important note here: if you are doing some sort of stereoscopy
(and even if you aren’t,) you may run into some sync issues. Obscure
analog equipment from the 80s could sync multiple monitors. I kind of
wish such a thing existed for modern displays.

Good luck with your project!On Sep 21, 2004, at 2:28 PM, Maximilien J. Collon wrote:

Thanks and regards,

Max

On Tue, 21 Sep 2004, Petri Latvala wrote:

On Tue, 2004-09-21 at 12:30, Maximilien J. Collon wrote:

Is there a way to tell SDL_VideoInit what screen to use?

The usual way of telling X11 windows what screen to use: The DISPLAY
environment variable.


Petri Latvala


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Quoting Petri Latvala :

On Tue, 2004-09-21 at 12:30, Maximilien J. Collon wrote:

Is there a way to tell SDL_VideoInit what screen to use?

The usual way of telling X11 windows what screen to use: The DISPLAY
environment variable.


Petri Latvala


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl