Countvertices and Counttriangles don't work?

Blitz3D Forums/Blitz3D Programming/Countvertices and Counttriangles don't work?

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.

Maybe there are zero vertices/tris in the surface you are checking...

Try this:
function DebugMeshCounts(mesh)
n_surfs = countsurfaces(mesh)
debuglog "surfaces: "+n_surfs
for s = 1 to n_surfs
surf = getsurface(mesh,s)
n_verts = countvertices(surf)
n_tris = counttriangles(surf)
debuglog "surface "+s+" verts: "+n_verts+" tris: "+n_tris
t_verts = t_verts+n_verts
t_tris = t_tris+n_tris
next
debuglog "total verts: "+t_verts
debuglog "total tris: "+t_tris
end function