delorie.com/archives/browse.cgi | search |
From: | flupke <schawat AT club-internet DOT fr> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Problems with Allegro's texturemapping |
Date: | Wed, 15 Jul 1998 14:24:50 +0200 |
Organization: | Grolier Interactive Europe |
Lines: | 33 |
Message-ID: | <35AC9F92.AEC9C66E@club-internet.fr> |
References: | <35A95CFE DOT 2518 AT lyseo DOT edu DOT ouka DOT fi> |
NNTP-Posting-Host: | toulon5-92.club-internet.fr |
Mime-Version: | 1.0 |
NNTP-Posting-Date: | 15 Jul 1998 13:51:35 GMT |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Timo Asikainen wrote: > I'm programming a landscape engine for a game. The method I use is > simple: > > I have a mesh in which all vertices have a height. These vertices are > connected to each other by lines which form triangles. > > (Here's a nice ASCII pic:-)) > > +-+-+-+ > |\|\|\| > +-+-+-+ > |\|\|\|<---- a triangle > +-+-+-+<-----a vertex > > Now, what I try to do is texturemap these triangles. I want to > texturemap them so that I can map a big photograph of for example grass > or rock onto this landscape. Or if the texture is a small one (for > example 64x64) I could tile it on the landscape. The problem is that in > Allegro I have to calculate proper texturemap coords. for each vertex of > a triangle and I don't know any good algorithm for calculating the > texmap coords. so that I could achieve what I want to do. > > If anyone knows any good netsites on the subject or have some good > algorithms please let me know about them.. Try the rule of three...
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |