[Scummvm-devel] Bitdepth/pixel format API concerns

Eugene Sandulenko sev at scummvm.org
Sat Jun 13 15:32:16 CEST 2009


On Sat, 13 Jun 2009 04:43:59 -0700
J Northup <upthorn at gmail.com> wrote:

> On Sat, Jun 13, 2009 at 3:12 AM, Marcus Comstedt <marcus at mc.pp.se>
> wrote:
> 
> >
> > J Northup <upthorn at gmail.com> writes:
> >
> > > bool isABGR(void): true if the backend uses ABGR color order,
> > > false if backend uses RGBA.
> >
> > And if the color order is ARGB?  I don't quite understand the need
> > for this method, as you can already query the PixelFormat, which
> > contains both ordering and number of bits.  Just knowing "ABGR or
> > not ABGR" does not give enough information anyway.
> 
> I have been told by _sev that RGBA and ABGR are the only orders
> supported by any backend. Is this incorrect?
Sorry, I never said that. On you mentioning ABGR mode I pointed out
that so far we passed only RGBA data to backends.

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.


Eugene




More information about the Scummvm-devel mailing list