Hi,
I'm trying to draw a line in DirectX and am having problems.
I try to draw the line with....
LineData(0) = CreateTLVertex(100, 1000, 0, 1, 0, 0, 0, 0)
LineData(1) = CreateTLVertex(100, 100, 0, 1, 0, 0, 0, 0)
D3DDevice.DrawPrimitiveUP D3DPT_LINELIST, 1, LineData(0), Len(LineData(0))
But the line does not show.
It seems to be something to do with the line width.
If I change the coords to...
LineData(0) = CreateTLVertex(100, 1000, 0, 1, 0, 0, 0, 0)
LineData(1) = CreateTLVertex(101, 100, 0, 1, 0, 0, 0, 0)
Then it draws the line, but if I move around the coords to different parts of the screen, the thinkness of the line changes slightly depending on where on the screen it is, sometimes makaing it have no width and therefor invisible...
Cant believe its this hard to draw a line!!!
Thanks for any help,
Rob D.
ProIV Resource Centre
I'm trying to draw a line in DirectX and am having problems.
I try to draw the line with....
LineData(0) = CreateTLVertex(100, 1000, 0, 1, 0, 0, 0, 0)
LineData(1) = CreateTLVertex(100, 100, 0, 1, 0, 0, 0, 0)
D3DDevice.DrawPrimitiveUP D3DPT_LINELIST, 1, LineData(0), Len(LineData(0))
But the line does not show.
It seems to be something to do with the line width.
If I change the coords to...
LineData(0) = CreateTLVertex(100, 1000, 0, 1, 0, 0, 0, 0)
LineData(1) = CreateTLVertex(101, 100, 0, 1, 0, 0, 0, 0)
Then it draws the line, but if I move around the coords to different parts of the screen, the thinkness of the line changes slightly depending on where on the screen it is, sometimes makaing it have no width and therefor invisible...
Cant believe its this hard to draw a line!!!
Thanks for any help,
Rob D.
ProIV Resource Centre