Oops, sorry, I changed my variable names before posting to try to make it more readable. The code should be
For GraphLoop = 1 To NumXValues
v=AddVertex(Surf,4,0,GraphLoop,0,1,0) ; create vertex on horiz plane
v=AddVertex(Surf,4,GraphValues(GraphLoop),tempy,0,0,0) ; create vertex at y-value
Next
For GraphPolyLoop = 0 To 5
v0 = GraphPolyLoop * 2
v1 = v0 + 1
v2 = v1 + 1
v3 = v2 + 1
AddTriangle (surf,v0,v1,v2)
AddTriangle (surf,v2,v1,v3)
next
Where GraphValues is an array of several integers.
---------------
In short, I'm looping across the x values creating 2 verticies for each. I need help with how to set the u and v values with the AddVertex commands above so that I can properly map a texture to it.
For GraphLoop = 1 To NumXValues
v=AddVertex(Surf,4,0,GraphLoop,0,1,0) ; create vertex on horiz plane
v=AddVertex(Surf,4,GraphValues(GraphLoop),tempy,0,0,0) ; create vertex at y-value
Next
For GraphPolyLoop = 0 To 5
v0 = GraphPolyLoop * 2
v1 = v0 + 1
v2 = v1 + 1
v3 = v2 + 1
AddTriangle (surf,v0,v1,v2)
AddTriangle (surf,v2,v1,v3)
next
Where GraphValues is an array of several integers.
---------------
In short, I'm looping across the x values creating 2 verticies for each. I need help with how to set the u and v values with the AddVertex commands above so that I can properly map a texture to it.