• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# Mapping a texture for a terrain

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1Icarus3  Members

Posted 25 July 2001 - 01:34 AM

How do u map one single texture over your whole terrain?? I am using the code from OpenGL Lesson 35

### #2mittens  Members

Posted 25 July 2001 - 06:00 AM

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

### #3zedzeek  Members

Posted 25 July 2001 - 10:34 AM

also checkout www.vterrain.org
btw if the terrain is reasonably big having just the one texture is gonna look like crap

### #4Spencer  Members

Posted 30 July 2001 - 01:57 AM

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

### #5Khawk  Senior Staff

Posted 30 July 2001 - 03:58 AM

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

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.