Results 1 to 3 of 3

Thread: texture mapping problem

  1. #1
    Junior Member Newbie
    Join Date
    Sep 2003
    Posts
    2

    texture mapping problem

    i have a texture for road but it is only one piece of it, how do
    apply the texture so it look like a long road?
    thanks in advance.

  2. #2
    Senior Member Regular Contributor
    Join Date
    Apr 2003
    Location
    Toulouse, France
    Posts
    133

    Re: texture mapping problem

    use the warp parameters for S and T texture coordinates.

    if S correspond to the width and T correspond to the length, set GL_CLAMP_TO_EDGE for S warp mode (using glTexParameter) and GL_REPEAT for T warp mode.
    now, when rendering, set the T texture coordinate of the road's vertice corresponding to the distance from the road start point.

  3. #3
    Junior Member Newbie
    Join Date
    Sep 2003
    Posts
    2

    Re: texture mapping problem

    how do i map the road to the center and place other texture at both side

Similar Threads

  1. Replies: 1
    Last Post: 01-10-2005, 09:50 AM
  2. Replies: 0
    Last Post: 01-09-2005, 06:01 PM
  3. Replies: 0
    Last Post: 01-09-2005, 05:53 PM
  4. Replies: 1
    Last Post: 01-09-2005, 05:50 PM
  5. Texture mapping problem
    By occamrzr in forum OpenGL: Basic Coding
    Replies: 10
    Last Post: 01-15-2001, 01:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean