Re: [AD] Color conversion problems

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> comes out looking wrong with WIP 3.9.36 (Windows), as if the pixels have
> just been directly copied from 16-bit to 15-bit without doing the bit
> shifting.

I can't reproduce.
Could you specify: gfx card, Windows version, DirectX version, Windows
desktop color depth ?
Which Allegro gfx driver are you using ? fullscreen, windowed, overlay ?

Could you test the following code:

#include<allegro.h>

int main()
{
   BITMAP *bmp;

   allegro_init();
   install_keyboard();

   set_color_depth(15);
   if (set_gfx_mode(GFX_AUTODETECT, 320, 200, 0, 0) != 0) {
      allegro_message("%s", allegro_error);
      return -1;
   }

   bmp = create_bitmap_ex(16, 320, 200);
   clear_to_color(bmp, makecol16(255, 255, 255));

   circlefill(bmp, 160, 100, 50, 0x8000);

   blit (bmp, screen, 0, 0, 0, 0, 320, 200);
   readkey();

   return 0;
}
END_OF_MAIN();

Is the circle displayed in black color ?

> If I compile this same code with DOS Allegro 3.11, the result looks fine.

Could you compile the previous code with Allegro 3.9.36 DOS ?

--
Eric Botcazou
ebotcazou@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/