BMatjasic
Member
Hello everyone,
Recently I've been messing around with vertexes and I wonder, how would I be able to apply a repeated texture on a triangle, because I've been pretty unsuccessful with xtex and ytex arguments... The way I currently draw it is:
And the outcoming result is:
QUESTION:
How would I be able to repetable apply smooth texture over those triangles?
PS: I've commented code for bottom triangles just for the easier preview
Recently I've been messing around with vertexes and I wonder, how would I be able to apply a repeated texture on a triangle, because I've been pretty unsuccessful with xtex and ytex arguments... The way I currently draw it is:
Code:
DrawTerrain();
draw_primitive_begin_texture(pr_trianglestrip, background_get_texture(background0));
for(var i=0; i < ds_list_size(Points); i++) {
if((i+1)%2 == 0) {
draw_set_color(c_white);
var pointMap = ds_list_find_value(Points, i-1);
var px = ds_map_find_value(pointMap, "x");
var py = ds_map_find_value(pointMap, "y");
var pointMap1 = ds_list_find_value(Points, i);
var px1 = ds_map_find_value(pointMap, "x");
draw_vertex_texture(px, py,1,1);
draw_vertex_texture(px1, py, 1, 1);
draw_vertex_texture(px, room_height, 1,1);
}
}
draw_primitive_end();
QUESTION:
How would I be able to repetable apply smooth texture over those triangles?
PS: I've commented code for bottom triangles just for the easier preview