![]() |
|
Allegro with multiple monitors |
Louis S
Member #5,503
February 2005
|
Does anyone know how to make Allegro display on one external monitor with a different display on the laptops lcd display? I am trying to write a scoreboard program with a display being output to a TV and controlled by the laptop. I would greatly appreciate any help. |
Matthew Leverton
Supreme Loser
January 1999
![]() |
I think you will have to run the program in Windowed mode and drag (or positition it) it to the other monitor. Using the Win32 API you could probably create a window without any toolbars/borders and resize it to fit the second display. Then you could attach Allegro to it. |
Louis S
Member #5,503
February 2005
|
What do you mean by attach Allegro to it? Is there some kind of way to write to the buffer that goes to the other screen or whatnot? I've never dealt with multiple monitors before. To be honest, I didn't know Allegro had a windowed mode. Can it have multiple windows at once since one would be the display window and the other would be for controlling it? |
Steve Terry
Member #1,989
March 2002
![]() |
Good luck there, you could run windowed sure, create two running programs with some sort of shared file/memory system so one knows what the other is doing... not sure. As far as allegro is concerned with windows there is only one screen and monitor, it cannot go to another one. Also a laptop can only output one screen too, unless you have dual video cards or dual screen capability. Just write one program and show all the screen contents onto a projector or something, I've done that before with allegro, you can see the screen on the laptop and the projector at the same time. ___________________________________ |
Louis S
Member #5,503
February 2005
|
I can't display the same contents onto each display. The laptop needs to display controls and setup options while the laptop's output will show the compiled results which are run into a video switcher and overlayed with the live video signal. Think of it as a character generator for sports games and the like. We can't afford a real one so we figured we can pull off something simple. |
Steve Terry
Member #1,989
March 2002
![]() |
Use two laptops and TCP/IP... you can't get a laptop to have two separate pages of video memory, what's on the screen is what is sent out as video out as well. ___________________________________ |
Matthew Leverton
Supreme Loser
January 1999
![]() |
Quote: What do you mean by attach Allegro to it? Quote: Can it have multiple windows at once since one would be the display window and the other would be for controlling it? Allegro cannot, but you might be able to create two via the Win32 API. Allegro could be attached to the second window. However the controlling window would then be written in Win32 code, and not Allegro. Personally, I don't think what you are trying to do is something that Allegro can do very well. Future versions will probably be better with multiple windows, but I doubt you can wait a few years for that to happen... You could create hacks to work around limitations. For instance, you could write two Allegro programs and communicate back and forth by dropping text files in a directory or sending messages. Edit, I was beaten... Quote: Also a laptop can only output one screen too No, laptops can output two different screens. Mine can. The LCD is one desktop and the TV is another. |
Steve Terry
Member #1,989
March 2002
![]() |
Oh ok, if you can do that, I wasn't sure. Then create two programs and communicate via TCP/IP on 127.0.0.1, not hard ___________________________________ |
Louis S
Member #5,503
February 2005
|
About the laptop, I apologize, that is what I meant. One screen is LCD built into laptop, the other is video out. I think I will try the multiple program hack. As long as I can make the output all pink except what I want drawn then it is good enough. I don't know enough about windows api to bugger around with that stuff. I may try the thing suggested by MidoriKid at http://www.allegro.cc/forums/view_thread.php?_id=326345 first. - Edit - |
Steve Terry
Member #1,989
March 2002
![]() |
Louis, the socket API is not that hard, I have some stuff if you want it or hit up BAF to help you with it, he loves that stuff ___________________________________ |
Louis S
Member #5,503
February 2005
|
If you have a link to a good tutorial that would be awsome. Most of the ones i've come across have been kinda dense. |
relpatseht
Member #5,034
September 2004
![]() |
I have found Beej's Guide to Network Programming to be a good resource.
|
A J
Member #3,025
December 2002
![]() |
what platform are you using ? im on windows, i have several windows open at once. and i can put them on seperate monitors, seperate gfx cards. i use shared memory to transfer the data to each window, that is running in its own process.. so that they can crash seperately and not bring down each other. ___________________________ |
Louis S
Member #5,503
February 2005
|
I'm using windows. You can position a window on an external monitor so that the entire screen is drawable area with no border around it? |
NyanKoneko
Member #5,617
March 2005
![]() |
DirectX has some examples that use dual displays, totally full screen. You'll havev to do a little DX programming to set it up with allegro. I'm sure it can be done, but it might be difficult. I bet if you use DX to set up the dual display mode, then switch allegro between windows, you can get dual display to work. This is all theory, of course. ----------------- |
Tobias Dammers
Member #2,604
August 2002
![]() |
Hmm... communicating through TCP/IP seems the cleanest solution to me. You should have 2 dedicated apps then, one "renderer" that produces the projector output, and a "controller". This layout has several advantages: --- |
NyanKoneko
Member #5,617
March 2005
![]() |
If what he wants to do is create one window that expands both monitors, then the TCP idea is kinda silly. I have seen DirectX demos that extended the frame buffer between two screens (so if you have two 1600x1200 monitors side by side, the game plays at 3200x1200). In this case, setting up some special directX routines to interface with allegro would probably work best. If he wants to go all DS-like, however, and run one main game in one window, and some extra stuff (like a map in a window) on another display, then TCP would be cool because you could not only run two apps on one computer, but also on another computer, like a laptop nearby, as well. ----------------- |
Tobias Dammers
Member #2,604
August 2002
![]() |
Indeed. Didn't sound like that though. --- |
Louis S
Member #5,503
February 2005
|
Yeah Tobias, the brute force is what I'm looking at doing. The scoreboard never has to talk back to the controller since the controller stores all the meaningful data anyway. I'm still working on understanding TCP/IP stuff but I'm hoping not to have to fall back on the DX hack. |
|