[SDL] Multiple Graphic Adapters

Andrew Straw andrew.straw at adelaide.edu.au
Tue Jul 30 20:18:00 PDT 2002

> I want to know if its possible to use SDL with a second (not the 
> primary one) graphics adapter, means to have an ordinary desktop 
> running (primary adapter) and a second one (TV-OUT) to use with SDL . 
> I've found only SDL_inits without the possibility to tell which adapter 
> to use. Thanks in advance for any answer

At the moment, what you want is not in the API.  Option 1: Modify SDL to 
allow this in the general case in a cross-platform way. I think it would 
be not-too-difficult to graft on a bit of new API that allows you to 
specify device/screen before/in the call to set_mode.  We would also 
want this modification to allow us to use the pseudo-2nd devices offered 
by the dual (and triple!) output video cards. I looked into these issues 
a little, but don't have the time to do any implementation. My thoughts 
are best summed up in a past email to this list, which was in response 
to a different question, but I think what I wrote is relevant to your 
question: http://www.libsdl.org/pipermail/sdl/2002-July/047186.html

Option 2: If the above is beyond what you're willing or able to do and 
if you don't mind creating a personal version of the library that you've 
hacked a little bit, it should be fairly easy just to modify your copy 
of SDL to open on a device different than the default.

In either case, in X11, you would would set the display to localhost:0.1 
for the 2nd device.  (localhost:0.0 would be the 1st.)  I know in Mac OS 
X it's also possible, and I assume it's possible in win32.  I can't 
remember the window manager/system calls at the moment for any of these 

I hope this helps!  I would route for the option number 1, because then 
we could all use the fruit of your labor!

Andrew Straw
Ph.D. student -- Department of Physiology, University of Adelaide, 
Developer -- The Vision Egg -- http://www.visionegg.org/
andrew.straw at adelaide.edu.au

More information about the SDL mailing list