Quote: " i just thought you could group a certain number of vertices to one index but i guess its just not possible.."
You already have a function to set
one vertex, anything else you can do yourself based on that function.
This is a untested mockup, but it should demonstrate one way to do what you want. Note that it requires the
Matrix1 Utilities.
dim vert(3) as word
vert(0) = 0 // Vertex 0
vert(1) = 1
vert(2) = 3
vert(3) = 20 // As you can see, this allows you to set «any» vertices, not just linearly from x to y
// Lock vertex data for some mesh as usual
setVerticesPosition(get arrayptr(vert()), 0.0, 1.0, 0.0) // Sets all vertices in 'vert' to position (0, 1, 0)
// Unlock vertexdata
// ...
// NOTE: This function assumes that you already have locked vertex data for a mesh
function setVerticesPosition(pVert as dword, x as float, y as float, z as float)
local dim vert(0) as word
link array vert(), pVert
for v = 0 to array count(vert())
set vertexdata position vert(v), x, y, z
next v
unlink array vert()
endfunction
"Why do programmers get Halloween and Christmas mixed up?" Because Oct(31) = Dec(25)