Re: [AD] Windows- Multiple cards causes Allegro to break |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I've seen a few mentions of this problem scattered about, however I
thought
> I'd share my experience (hopefully this isn't just repeating everything
> that's already known). I don't have the expertise to fix this in Allegro
so
> hopefully this information can help someone who understands the DirectX
> driver better.
Unfortunately, I'm not sure anyone does really understand it at this
point... still, we'll have to see what we can do.
> It seems that when using multiple video cards in Windows, Allegro is
unable
> to function correctly. Remember this is two separate physical cards, the
> behavior may be different when using a single dual-head card.
Yes, this probably makes a difference. I know Allegro was tested on
multiple monitor systems a while ago, but that could have been from one
video card.
> When using DirectX fullscreen driver:
> The primary card switches to the proper resolution and displays a window
> border of the Allegro application in a corrupt color. No other video is
> displayed (random color in window contents). Audio, keyboard, etc still
> work.
>
> When using DirectX window driver:
> If the Allegro window is completely within the bounds of the primary
card:
> Window is created at correct size. Nothing is ever placed in the window's
> contents. Audio, keyboard, etc work.
> Interestingly, if I initiate a move of the application within the primary
> card it starts working correctly only during the move. Video is drawn
> correctly within the window. After I initiate the move, as long as I hold
> the mouse button down (I haven't "finished" the move), the window keeps
> updating correctly! Upon completing the move (letting go of the mouse
> button), the video stops being updated.
>
> If the Allegro window is completely within the bounds of the secondary
card
> (after being moved there):
> Application works as expected. No problems.
>
> If the Allegro window is split between the bounds of the primary and
> secondary card (after being moved there):
> The application works as expected! Amazingly, as long as just one single
> pixel is within the secondary card bounds, all pixels are correctly drawn
no
> matter what card they lie in.
Hmm... the following two paragraphs from MSDN may be relevant:
Full-screen exclusive mode DirectDraw objects will take advantage of
hardware acceleration regardless of whether they are running on the
primary device or on a secondary device. However, they cannot use built-in
support for spanning graphics operations across display devices. It is the
application's responsibility to perform operations on the appropriate
device.
When the normal cooperative level is set, DirectDraw uses hardware
acceleration only when the window is wholly within the display area of the
primary device. When a window straddles two or more monitors, all blits
are done in emulation and performance can be significantly slower. This is
necessarily the case, because hardware buffers cannot blit to a display
surface controlled by another piece of hardware.
> I may look at the source of Allegro to see the fixablity of this, but I
> don't know my way around DirectX enough to really do much. Hopefully
someone
> can make sense of this problem.
I think you could start with the DirectDrawCreate call in wddraw.c and see
if that has to changed in anyway. A quick look at its MSDN entry suggests
that it may need to be.
I may decide to look into this later, but I don't use Windows and know next
nothing about DirectX, so any assistance you or anyone else can offer here
is most welcome.
It may also pay to see how SDL handles systems with two video cards.
Evert