Issues texturing a 2d polygon

Blitz3D Forums/Blitz3D Beginners Area/Issues texturing a 2d polygon

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

bram32 on codersworkshop was able to shed some light on the problem.

To set the u# and v# of each vertex, you should use VertexTexCoords.


v1=AddVertex(Surf,4,0,GraphLoop,0,1,0) ; create vertex on horiz plane
v2=AddVertex(Surf,4,GraphValues(GraphLoop),tempy,0,0,0) ; create vertex at y-value

vertextexcoords Surf, v1, 0, float(graphloop) / float(numxvalues)
vertextexcoords Surf, v2, 1, float(graphloop) / float(numxvalues)

A little bit of tweaking and it was working a treat!