Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » How to start DUAL DISPLAY AND DUAL SCREEN

This thread is locked; no one can reply to it. rss feed Print
How to start DUAL DISPLAY AND DUAL SCREEN
leixiong
Member #12,688
March 2011

How to start DUAL DISPLAY AND DUAL SCREEN ?

Is there any infomation for this ?

Thomas Fjellstrom
Member #476
June 2000
avatar

Depends if you are using Allegro 4 or Allegro 5. With Allegro 5 its easy. Just look at the Display and Monitor apis. For Allegro 4 you're out of luck.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

leixiong
Member #12,688
March 2011

There is a foreground window to display animation, the background for change parameter.

The background change some parameter, then the foreground display correspond animation.

The background and foreground is all alone in different desktop and can not see each other.

Example:
In Windows XP I can install two display card and echo one connect to a monitor. Then I can

extend the desktop. The main window is normal ID to 1 and the expand is ID to 2. My program

can display animation on main window and display background on extend desktop.

Can linux do this ?

When I install two display card in computer and setup linux (Debian) the system is dead.

I see that we can open two windows but they all display in one desktop. They can see each

other.

Can anyone help me to do this ?

Thanks, Lei Xiong

Thomas Fjellstrom
Member #476
June 2000
avatar

leixiong said:

Can linux do this ?

Sure, but you need to understand how to set something like that up in the xorg.conf file. I suggest you get studying ;)

Quote:

I see that we can open two windows but they all display in one desktop. They can see each other.

When you have two video outputs, you need to tell allegro to create the window on secondary outputs. take a look at al_set_new_display_adapter. That's the function you use prior to al_create_display to tell allegro to create the display on a specific output.

The easiest (and likely only way) way to get dual screens in allegro+linux+X is to use a graphics card with two or more ouputs built in.

OpenGL on linux doesn't play nicely with separate graphics cards. As far as I know there is no way to get OpenGL to work properly across two separate graphics cards, at least with the open source drivers (Mesa/DRI are broken when trying to use GL/GLX from two separate cards in the same program).

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

leixiong
Member #12,688
March 2011

I see.

I will setup dual vidio system first with xorg.conf .

Then I can write program with " al_set_new_display_adapter al_create_display" that

provide by allegro.

Thanks a lot.

Go to: