Oh right - didn't see that. Some how mine is a lot longer [wink] but then again I'm using triangle lists, which increases the number of vertices sixfold!
Try using D3DPT_LINESTRIP, not D3DPT_LINELIST: line list draws lines such that
{0,1,2,3}->{0,1} {2,3}
But since you're only adding one vertex per line, when, if you're doing that then you need line_strip which does this:
{0,1,2,3}->{0,1} {1,2} {2,3}
And, actually, reviewing your code, I think I see a bigger problem:
Allow me to illustrate how you're setting out your vertices0 1 2 3 4 56 7 8Now, if we add in the lines as would be in D3DPT_LINELIST:0 - 1 2 - - -3 4 - 56 - 7 8Which is not what you want. Changing it to D3DPT_LINESTRIP probably won't help much either:0 - 1 - 2 - - -3 - 4 - 5 - - -6 - 7 - 8
What you're missing is the lines
in between the lines: those that run along the z-axis. Now, I think you may have to set up another loop to put those in (its actually easier with triangle primitives, IMHO) or figure out some other way. But I think that might *actually* be the problem.
Sorry for being so slow on the intake.
DrawPrimitiveUP is just another rendering method:
object.DrawPrimitiveUP( _ PrimitiveType As CONST_D3DPRIMITIVETYPE, _ PrimitiveCount As Long, _ VertexStreamZeroDataArray As Any, _ VertexStreamZeroStride As Long)
is the SDK prototype. It basically just takes an array of vertices and renders them instead of taking a vertex buffer. It does not render them immediately, but batches the calls. Which makes it useful in different situations...
But I'd take a look at how you lay out your vertices; take a piece of paper and chart them. You may find some other way to do it or something else you missed... or a pot of gold! You'll never know until you try!
Mushu - trying to help those he doesn't know, with things he doesn't know.
Why won't he just go away? An question the universe may never have an answer to...