www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/10/17/10:40:18

From: dante AT ctonline DOT it (Roberto)
Newsgroups: comp.os.msdos.djgpp
Subject: polygon texture with allegro
Date: Sat, 17 Oct 1998 14:33:43 GMT
Organization: Centro Servizi Interbusiness
Lines: 46
Message-ID: <3628aab1.4885980@news.interbusiness.it>
NNTP-Posting-Host: 194.243.71.86
X-Newsreader: Forte Free Agent 1.11/32.235
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

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 -


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