Mesh: Mapping a texture file

Hi,

i have

  • a grid with the resolution if 5 x 3 (=> 8 subareas)
  • a vertex buffer with texture coordinates
  • and finnaly a mesh mit 48 indices

Actually my texture file is displayed 8 times (compare grid resolution).

Which texture coordinates do i have to use in order to display one big sized texture file?

Thanks,
Johannes

hello kitty,

make sure your texture coordinates go from 0,0 to 1,1 over all the vertices. so the topleftmost vertex would have a texcoord of 0,0 and the bottomrightmost 1,1. all the vertices between should have according interpolated texcoords. shouldn’t be too tricky, hope that helps.

Hi joreg, thanks for your reply!!

I even dont know how many texture coordinates i have to use. 15, because i have a grid of 5 x 3? How are the coordinates ordered?

THANKS,
Johannes

#cccccc:PS: Sorry for this beginner question!

texture coordinates are a property of the vertex. just like the position (xyz) is. so you have one texture-coordinate per vertex, which makes 15 in your case, right. which makes a spread of 30 values as each texcoord is a 2D vector. see?