So anyway, I'm working with a piece of code..which i should really know by heart..considering how many times i've written it in the past. So I'm wanting to draw a 3D grid using a for loop (and 3d vertex's in my case) Now, the code works.. but I'm sure I remember it being simpler.. I don't want to waste resources.
Thanks allot!
{ xx = 0;
yy = 0;
d3d_primitive_begin_texture( pr_trianglestrip, tex.grid );
for (xx = 0; yy <= 320; xx+= 64) {
d3d_vertex_texture( xx, yy, 50, 0, 0 ) ;
d3d_vertex_texture( xx, yy + 32, 50, 0, 1 ) ;
d3d_vertex_texture( xx + 32, yy, 50, 1, 0 ) ;
d3d_vertex_texture( xx + 32, yy + 32, 50, 1, 1 ) ;
if xx = 320 {
d3d_vertex_texture( xx + 32, yy + 32, 50, 1, 1 ) ;
xx = -64;
yy += 32 ;
}
}
d3d_primitive_end();
}
Edited by o0Illusionist0o, 29 July 2012 - 08:25 PM.











