From: Shawn Hargreaves Newsgroups: comp.os.msdos.djgpp Subject: Re: HELP with Allegro 3D Date: Mon, 24 Mar 1997 20:10:19 +0000 Organization: None Distribution: world Message-ID: References: <19970323214600 DOT QAA18325 AT ladder01 DOT news DOT aol DOT com> NNTP-Posting-Host: talula.demon.co.uk MIME-Version: 1.0 Lines: 31 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Quackerz writes: >I'm still having a hard time using allegro for 3d. I cant even get it to >draw one stupid triangle. I have only been programing for less then a I posted an example that draws a simple poly on to the screen a couple of weeks ago. Search the mail archives for "quad3d". >frustrated. The Allegro V3D structure has also confused me. How can each >vertex have texture mapping coordinates? I have many more questions. The u/v coordinates are only relevant for texture mapped drawing modes (duh :-) If you are using flat shaded or gouraud shaded polys, you can just set them to zero. Texture coordinates are a tricky thing to get your brain around at first, but they really aren't as complicated as they seem. They simply define which part of the texture map (which is a 2d bitmap) should be drawn at that vertex. Say you have a 32x32 texture, which is to be mapped onto a quad. If you give the first vertex u/v coordinates which are both zero, that means the top left pixel of the texture should be drawn at that location on the screen. If you give the second vertex a u/v position of (31,0), that means the top right pixel of the texture goes with the second vertex (and the middle part of the texture is stretched to fill whatever gap lies between the two vertices). There are a couple of decent texture mapping tutorials on x2ftp, which would be worth taking a look at... -- Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/ Beauty is a French phonetic corruption of a short cloth neck ornament.