[Scummvm-devel] Bitdepth/pixel format API concerns
Filippos Karapetis
philipk79 at hotmail.com
Sat Jun 13 17:10:40 CEST 2009
Further to this: The problem posed seems to be exactly the same as platform endianess.
We can handle this in the exact same way that platform endianess is handled, and hidden
from the engines themselves. I.e. you can have a look at common/endian.h and the
SCUMM_LITTLE_ENDIAN / SCUMM_BIG_ENDIAN defines. We can use similar defines, e.g.
SCUMM_16BIT_ARGB and SCUMM_16BIT_BGRA or more, and we can define the appropriate
set of functions depending on the platform that ScummVM runs under, therefore hiding
the complexity from the engines themselves, and having only one format, RGBA.
Regards
Filippos
From: philipk79 at hotmail.com
To: scummvm-devel at lists.sourceforge.net
Date: Sat, 13 Jun 2009 14:40:51 +0000
Subject: Re: [Scummvm-devel] Bitdepth/pixel format API concerns
> I see no need on adding any code to perform RGBA->AGBR mode by engine.
> It is backend task to do that. Engine should provide fixed order.
>
> Consider this:
>
> If engine are to provide conversion, then on adding new backend engine
> authors have to work on it. This is bad. Instead backend authors should
> know what they platform really requires.
>
> And if, say, we will have some exotic ABRG1333 or whatever platform,
> why engines should bother? They should work with what is convenient for
> them, just as Kirben pointed out.
>
I agree with this, it's easier to provide *one* mode to the engines (probably
RGBA). The engines should be agnostic of the platform they run under, so
if a backend supports AGBR, then the conversion to and from RGBA should
be done at backend level, not engine level. This would simplify the overall
initialization phase at the engine level considerably, and the complexity
would be moved to the backend level (where it belongs). There shouldn't
be any need to provide flexibility to the engines, in fact it would make
life easier for everyone if the engines would only have to deal with one
order (RGBA, most probably, as that's the one used currently).
Filippos
Insert movie times and more without leaving Hotmail®. See how.
_________________________________________________________________
Lauren found her dream laptop. Find the PC that’s right for you.
http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20090613/fca1506b/attachment.html>
More information about the Scummvm-devel
mailing list