Index:
[thread]
[date]
[subject]
[author]
From: Marcus Sundberg <mackan@stacken.kth.se>
To : ggi-develop@eskimo.com
Date: Mon, 19 Apr 1999 20:14:46 +0000
Re: GGI usage question
Christian Reiniger wrote:
>
> Marcus Sundberg wrote:
>
> >> >const ggi_pixelformat *pf = ggiGetPixelFormat(graphics->vis);
> >> >int pixelbytesize = pf->size/8;
> >>
> >> pf->size is the pixelsize in bits, right? Then this line won't work for
> >> 15bpp and other "non-even" depths (normal integer division IIRC rounds down
> >> - you need sonething rounding up)
> >
> >Pixelsize has nothing to do with depth.
>
> Ok, sorry. But is it guaranteed to be a multiple of 8? Sorry for this
> nitpicking, but that really looks like a candidate for later debugging
> headaches ;)
Unless you use the GT_SUB_PACKED_GETPUT subscheme or have a host-system
where word-size is not a multiple of 8, yes.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan/
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: mackan@stacken.kth.se
Index:
[thread]
[date]
[subject]
[author]