FeetUpGaming
Member
I have an issue with the texture vertex drawing functions. I have a ds grid being crated for a texture to be spread over it and then manipulated to create a waving pattern. However when i increase the resolution of the grid/mesh below 20 pixels per rectangle it just stops drawing the verteces at some point:
If i decrease the resolution of the grid (make the rectangles bigger and less of them) then it works fine.
Here is a sample of the draw code:
I'm wondering if there's just a limit with the textured meshes but that would be a pain if there is. Thanks for any help you can offer
If i decrease the resolution of the grid (make the rectangles bigger and less of them) then it works fine.
Here is a sample of the draw code:
GML:
draw_set_colour(c_white);
draw_primitive_begin_texture(pr_trianglelist, texture);
var _width = ds_grid_width(pointGrid) - 1;
var _height = ds_grid_height(pointGrid) - 1;
for(var i = 0; i <= _width; i++)
{
for(var j = 0; j <= _height; j++)
{
var _tl = pointGrid[# i, j]; //Top Left
if i < _width
&& j < _height
{
var _tr = pointGrid[# i + 1, j]; //Top Right
var _bl = pointGrid[# i, j + 1]; //Bottom Left
var _br = pointGrid[# i + 1, j + 1]; //Bottom Right
draw_vertex_texture(_tl[0], _tl[1], _tl[2], _tl[3]);
draw_vertex_texture(_tr[0], _tr[1], _tr[2], _tr[3]);
draw_vertex_texture(_bl[0], _bl[1], _bl[2], _bl[3]);
draw_vertex_texture(_bl[0], _bl[1], _bl[2], _bl[3]);
draw_vertex_texture(_tr[0], _tr[1], _tr[2], _tr[3]);
draw_vertex_texture(_br[0], _br[1], _br[2], _br[3]);
//show_debug_message(string(_tl));
}
draw_point(_tl[X], _tl[Y]);
}
}
draw_primitive_end();