Multiple Graphic Adapters

/* Enrico, 2002-07-30 */

Hi There,

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 … Enrico

/* Der Inhalt dieser eMail ist privat, eine anderweitige Verwendung verst?sst gegen geltendes Recht
und ist strafbar. / The content of this eMail is strictly private, any other use is prohibited by law. */

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
platforms.

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

Cheers!
Andrew________________________________________________________
Andrew Straw
Ph.D. student – Department of Physiology, University of Adelaide,
Australia
Developer – The Vision Egg – http://www.visionegg.org/
@Andrew_Straw


/* Enrico, 2002-07-31 */

eMail vom 2002-07-31, Re: [SDL] Multiple Graphic Adapters, (andrew.straw at adelaide.edu.au)

Hi Andrew,
you are right, to have more adapters working with the unchanged SDL library should work with any X-servers, windoze seems to be more complicated. When I’ve looked into the MSN library, I found that only NT/2000/XP supports (real) multiple devices (eg. adapters). The DISPLAY_DEVICE -structure is not supported in Win95/98/Me. So I think You may have multiple screens in windoze but not commonly devices which means You may use multiple adapters to extend the desktop but having the desktop running with the primary adapter and some other applications (not handled by the windowmanager) on other ones is not commonly possible with windoze. If you have a visual c++ compiler at hand you may try the following small programm to see whats the case. IMPORTANT: I cant compile it with DEV-c++ (don’t have visual c++), I don’t therefore if its compiling or working.

#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

DISPLAY_DEVICE devstruct;
PDISPLAY_DEVICE dsptr= &devstruct;
int dev=0;

int main(int argc, char *argv[])
{
devstruct.cb= siezeof(devstruct);

while (EnumDisplayDevices(NULL,dev,dsptr,0L)) {
printf(“Name: %s, String: %s, ID: %s, Key: %s\n”,&devstruct.DeviceName[0],
&devstruct.DeviceString[0],
&devstruct.DeviceID[0],
&devstruct.DeviceKey[0]);
if ( devstruct.StateFlags & DISPLAY_DEVICE_ATTACHED_TO_DESKTOP ) printf(“attached to desktop\n”);
if ( devstruct.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER ) printf(“mirrored\n”);
if ( devstruct.StateFlags & DISPLAY_DEVICE_MODESPRUNED ) printf(“more modes\n”);
if ( devstruct.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE ) printf(“primary\n”);
if ( devstruct.StateFlags & DISPLAY_DEVICE_REMOVABLE ) printf(“removable\n”);
if ( devstruct.StateFlags & DISPLAY_DEVICE_VGA_COMPATIBLE ) printf(“vga\n”);
}
system(“PAUSE”);
return 0;
}

Best regards, Enrico

/* Der Inhalt dieser eMail ist privat, eine anderweitige Verwendung verst?sst gegen geltendes Recht
und ist strafbar. / The content of this eMail is strictly private, any other use is prohibited by law. */