Jump to content

  • Log In with Google      Sign In   
  • Create Account


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.

  • You cannot reply to this topic
4 replies to this topic

#1 Icarus3   Members   -  Reputation: 122

Like
Likes
Like

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

Sponsor:

#2 mittens   Moderators   -  Reputation: 1315

Like
Likes
Like

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

#3 zedzeek   Members   -  Reputation: 528

Like
Likes
Like

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

#4 Spencer   Members   -  Reputation: 126

Like
Likes
Like

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

#5 Khawk   Senior Staff   -  Reputation: 1361

Like
Likes
Like

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.



PARTNERS