[SDL] aalineRGBA problem
Armin Steinhoff
A-Steinhoff at web.de
Wed Jun 14 00:52:59 PDT 2006
"clemens kirchgatterer" <everslick at gmail.com> schrieb am 13.06.2006 13:41:16:
>
> > > I suggest you skip the alpha stuff unless you need it and use
> > > SDL_DisplayFormat to get an image suitable for blitting.
> > > You're using ABGR, which on little endian machines happens to be what
> > > the opengl wants (big endiand RGBA), but using that to blit
> > > on screen in 2D is probably not what you're looking for, because I'm
> > > betting you're display surface has something other than ABGR
> > > (could it be ARGB?).
> >
> > Sorry ... I don't understand fully the concept behind these RGBA masks.
>
> the RGBA mask defines where in a single pixelvalue the different color
> channels get stored. this means, for example, if you are in a 32 bit mode,
> one pixel is stored in a 32 bit integer and each color of RGBA use 8 bits.
>
> pixel = 00101001 00101111 10101011 00011100
>
> if the masks are set as follwing:
>
> amask = 0xff000000
> rmask = 0x000000ff
> gmask = 0x0000ff00
> bmask = 0x00ff0000
>
> then the MSB holds the alpha value of the pixel and the LSB the red
> colour channel. you get the idea?
Yes ... but does it mean I can define the pixel format in that way for my individual surfaces ?
What happens if I use mask values different from 0xFF?
Thanks
--Armin
__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach!
Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131
More information about the SDL
mailing list