www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/09/08/20:50:58

Message-ID: <37D6CDAB.E3DB7091@swipnet.se>
From: Anders David Skarin <hobbit AT swipnet DOT se>
X-Mailer: Mozilla 4.5 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Does Allegro BLIT really convert between colordepths
References: <37D6C6F0 DOT 682D33AA AT swipnet DOT se>
Lines: 48
NNTP-Posting-Host: 130.244.210.54
X-Complaints-To: news-abuse AT swip DOT net
X-Trace: nntpserver.swip.net 936824427 130.244.210.54 (Wed, 08 Sep 1999 23:00:27 MET DST)
NNTP-Posting-Date: Wed, 08 Sep 1999 23:00:27 MET DST
Organization: A Customer of Tele2
X-Sender: s-437261 AT dialup210-1-54 DOT swipnet DOT se
Date: Wed, 08 Sep 1999 22:57:15 +0200
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Woops... ..just found out that Allegro flips
a 320*240 24bpp virtscreen to the screen at
50fps... .which is about 1/6 of what I expected..
..so I'll drop allegro and keep on bombing this
newsgroup with nearptr questions.

Sorry if this message seems rude to Allegro.. 
..I'm sure it will do great with all the
hardware blits and stuff supported.

Anders David Skarin wrote:
> 
> Since vesa programming using DJGPP+NASM seems to be such
> a struggle that even this newsgroup can answere my questions,
> I have decided to let my "do it all" attitude go and give in
> to the dark force... ALLEGRO.
> 
> There is one small thing i can't get over though... blit will
> not (as the manual sas) convert between differnt colordepths.
> 
> Since my VESA routines used 32bit internaly, this is what I
> wanted to do with ALLEGRO as well. But this code will produce
> a GREEN screen rather than an ORANGE.
> 
> int main(void)
> {
>         allegro_init();
> 
>         BITMAP *test = create_bitmap_ex(32,320,240);
> 
>         destroy_bitmap(test);
> 
>         set_color_depth(16);
>         if(set_gfx_mode(GFX_VESA2L,320,240,0,0)!=0)printf("sorry\n");
> 
>         for(int y =0; y<240; y++)
>         for(int x =0; x<320; x++)
>                 putpixel(test,x,y,0x00FF5500);
> 
>         blit(test,screen,0,0,0,0,320,240);
> 
>         getch();
> 
>         allegro_exit();
>         return 0;
> };
> 
> Any suggestions?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019