Mail Archives: djgpp/1998/10/17/16:31:55
Message-ID: | <006701bdfa0d$1e513800$9aafccc2@d9a9a4>
|
From: | "Linxman" <linxman AT polbox DOT com>
|
To: | <djgpp AT delorie DOT com>
|
Subject: | Re: polygon texture with allegro
|
Date: | Sat, 17 Oct 1998 22:31:26 +0200
|
MIME-Version: | 1.0
|
X-Priority: | 3
|
X-MSMail-Priority: | Normal
|
X-Mailer: | Microsoft Outlook Express 4.72.3110.1
|
X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
Reply-To: | djgpp AT delorie DOT com
|
Hi,
Texture size is 320x240 so max value for x is 319, and for y 239.
Hope it helps!
>I have a ploblem with allegro. I want apply a texture (2.bmp 320x240
>16bit ) at one polygon. I did in following method.
>Why it is wrong ?
>How can I resolve this problem ?
>
>V3D_f v1,v2,v3,v4;
>BITMAP *bmp,*texture;
>PALETTE pal;
>allegro_init();
>bmp=create_bitmap(640,480);
>texture=create_bitmap(320,240);
>clear(bmp);
>clear(texture);
>set_color_depth(16);
>set_gfx_mode(GFX_VESA1,640,480,0,0);
>texture=load_bmp("2.bmp",pal);
>v1.x=0;
>v1.y=0;
>v1.z=0;
>v1.u=0;
>v1.v=0;
>v1.c=0;
>
>v2.x=320;
>v2.y=0;
>v2.z=0;
>v2.u=320;
>v2.v=0;
>v2.c=0;
>
>v3.x=320;
>v3.y=240;
>v3.z=0;
>v3.u=320;
>v3.v=240;
>v3.c=0;
>
>v4.x=0;
>v4.y=240;
>v4.z=0;
>v4.u=0;
>v4.v=240;
>v4.c=0;
>quad3d_f(bmp,POLYTYPE_ATEX,texture,&v1,&v2,&v3,&v4);
>blit(bmp,screen,0,0,0,0,640,480);
>
>
- Raw text -