[SDL] SDL_OPENGLBLIT + SDL_SetColorKey()

Fabio 'SnowDruid' Franchello snowdruid at libero.it
Mon Aug 20 16:09:01 PDT 2001


At 23.59 20/08/01 +0200, you wrote:
>please narrow it down. Dump the "Logo" format params including the
>surface flags after LoadBMP and after each manipulation, to see where
>they are changed. I can't remote-debug for you

Ok:

Logo: after SDL_LoadBMP:
Video Flags:NO FLAGS

Surface = 8199856 [0]
palette: NULL
BitsPerPixel: 24
BytesPerPixel: 3
Rmask: 16711680
Gmask: 65280
Bmask: 255
Amask: 0
Rshift: 16
Gshift: 8
Bshift: 0
Ashift: 0
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 8
colorkey: 0
alpha: 255

Logo: after SDL_SetColorKey:
Video Flags: SDL_SRCCOLORKEY|SDL_RLEACCELOK

Surface = 8199856 [0]
palette: NULL
BitsPerPixel: 24
BytesPerPixel: 3
Rmask: 16711680
Gmask: 65280
Bmask: 255
Amask: 0
Rshift: 16
Gshift: 8
Bshift: 0
Ashift: 0
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 8
colorkey: 0
alpha: 255

Screen: After SetVideoMode(640,480,16,SDL_HWSURFACE|SDL_OPENGLBLIT)
Video Flags: SDL_OPENGL|SDL_OPENGLBLIT
Surface = 8199984 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: 0
alpha: 255

Logo:
Video Flags: SDL_SRCCOLORKEY|SDL_RLEACCELOK
Surface = 8199856 [0]
palette: NULL
BitsPerPixel: 24
BytesPerPixel: 3
Rmask: 16711680
Gmask: 65280
Bmask: 255
Amask: 0
Rshift: 16
Gshift: 8
Bshift: 0
Ashift: 0
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 8
colorkey: 0
alpha: 255

Screen: After SDL_DisplayFormat(Logo)
Video Flags: SDL_OPENGL|SDL_OPENGLBLIT
Surface = 8199984 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: 0
alpha: 255

Logo:
Video Flags: SDL_SRCCOLORKEY|SDL_RLEACCELOK|SDL_SRCALPHA
***(The alpha channel is added by SDL_DisplayFormat(), because Screen has 
an alpha
***channel, even if I don't set it (SDL_SetVideoMode() result)
Surface = 8192608 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: -16777216
alpha: 255

Screen: After OpenGL Init and before entering main loop
Video Flags: SDL_OPENGL|SDL_OPENGLBLIT
Surface = 8199984 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: 0
alpha: 255

Logo:
Video Flags: SDL_SRCCOLORKEY|SDL_RLEACCELOK|SDL_SRCALPHA

Surface = 8192608 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: -16777216
alpha: 255

Screen[8199728] right befiore blit:
Video Flags: SDL_OPENGL|SDL_OPENGLBLIT
Surface = 8199984 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: 0
alpha: 255

Logo[8192656] right before blit:
Video Flags: SDL_SRCCOLORKEY|SDL_RLEACCELOK|SDL_SRCALPHA
Surface = 8192608 [0]
palette: NULL
BitsPerPixel: 32
BytesPerPixel: 4
Rmask: 255
Gmask: 65280
Bmask: 16711680
Amask: -16777216
Rshift: 0
Gshift: 8
Bshift: 16
Ashift: 24
Rloss: 0
Gloss: 0
Bloss: 0
Aloss: 0
colorkey: -16777216
alpha: 255

Thanks,


          __
Fabio " '- nowDruid " Franchello
        ---'---------
--- snowdruid at tiscalinet.it ---





More information about the SDL mailing list