Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Sun, 18 Apr 1999 16:53:50 +0200

Re: GGI usage question

Christian Reiniger wrote:
> 
> Evan Martin 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.

//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]