Re: [AD] windowed mode

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> 1. Using hardware overlay

Like you said, not all cards support this option, so if implemented, I think
it should be an option.

> 2. Using implicit double buffering

This looks like the most obvious choice. Even low budget cards can do
hardware blits, and the speed penalty is usually very low. If scaling needs
to be done, and there's no hardware stretched blit, or if for some other
reason there's no hardware blitting available, performance can be poor, but
again, cards that can't handle straight hardware blits, are rare. (And even
in the case of a software double buffered system, performance can be
acceptable. The double buffering in the demo game, never seemed particular
slow to me)

You seem to have your doubts about the achieved performance with this
method. I have a win32 dx-wrapper library somewhere on my hard disk (called
RedX), which implemented windowed modes in this way. I can dig it up, if you
like, and give you some proof of the lack of speed penalty.

> 3. Scanline buffering

Question: if lots of/all scanlines are overwritten each frame (e.g. a tile
based scrolling system), would this result in a seperate blit of each
scanline, each frame? Cause I think the penalty of a seperate blit for each
scanline couldn't be ignored.

> 4. Direct primary surface access

Don't know about this one, It could be quite hard to implement an
intelligent scanline based clipping system without introducing too much
overhead, but OTOH, if it would only mean a performance hit, if the window
is partially overlapped/hidden, it seems like a nice idea.

I don't think one driver would suit all needs in any case. Personally, I'd
prefer an implicitly double buffered system, and maybe option 4 as a
fallback, for pure software systems?

Also, you should consider what a windowed mode is normally used for? I think
it would be used a lot for developing/debugging reasons (that's the main
reason I'd need it). But do a lot of people play games in a window? (I only
switch back to a windowed mode, to change a setting, do womething else,
...). I mean, I think it's more important to have a windowed mode that works
on all systems, than to have one that gets the best possible performance.

One more thing, mode switching (Alt-enter) is a must, I think. More thoughts
later.

Dominique




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/