Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DirectX Line drawing

Status
Not open for further replies.

robdon

Programmer
May 21, 2001
252
ES
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top