Archived

This topic is now archived and is closed to further replies.

Icarus3

Mapping a texture for a terrain

Recommended Posts

When you use glTexCoord*d and have values bigger than 1 as arguments, the texture will be repeated.
for example

glTexCoord2d(1,1) stretches the texture (or compresses it) over the whola area of your polygon.
glTexCoord2D(100,100) repeats the texture 100 times over the area...

hope it makes sense

--Spencer

Share this post


Link to post
Share on other sites
quote:
Original post by ShiningKnight
Go check out Flipcode's articles... They have a LOT of different stuff on terrain that may interest
you. (www.flipcode.com)

------------------------------
Trent (ShiningKnight)
E-mail me
OpenGL Game Programming Tutorials



And GameDev.net doesn't?

To answer the question, you need to calculate individual texture coordinates for each vertex. I would suggest looking at NeHe's flag demo (busy at work and can't go indepth at the moment here).

Kevin

Share this post


Link to post
Share on other sites