Hmmmm weird. It works fine on my comp. And I also have Vert_List(1) as TLVERTEX and this
I get only one line. Even when its 50, 50, 100, 50. Also be sure your DX is set on 32 bit color mode, and that the D3DColorRGBA has the alpha set at 255 so it doesnt appear invisible.Code:'My Type Public Type TLVERTEX X As Single Y As Single Z As Single RHW As Single Color As Long Specular As Long TU As Single TV As Single End Type 'My TLVERTEX constant: Public Const FVF_TLVERTEX As Long = D3DFVF_XYZRHW Or D3DFVF_TEX1 Or D3DFVF_DIFFUSE Or D3DFVF_SPECULAR 'My Setup Direct3D_Device.SetTextureStageState 0, D3DTSS_COLOROP, D3DTOP_MODULATE Direct3D_Device.SetTextureStageState 0, D3DTSS_COLORARG1, D3DTA_TEXTURE Direct3D_Device.SetTextureStageState 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE Direct3D_Device.SetTextureStageState 0, D3DTSS_ALPHAOP, D3DTOP_MODULATE Direct3D_Device.SetTextureStageState 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE Direct3D_Device.SetTextureStageState 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE Direct3D_Device.SetRenderState D3DRS_SRCBLEND, D3DBLEND_SRCALPHA Direct3D_Device.SetRenderState D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA Direct3D_Device.SetRenderState D3DRS_BLENDOP, D3DBLENDOP_ADD 'My Create_TLVertex function Public Function Create_TLVertex(ByVal X As Single, ByVal Y As Single, ByVal Z As Single, ByVal RHW As Single, ByVal Color As Long, ByVal Specular As Long, ByVal TU As Single, ByVal TV As Single) As TLVERTEX Create_TLVertex.X = X Create_TLVertex.Y = Y Create_TLVertex.Z = Z Create_TLVertex.RHW = RHW Create_TLVertex.Color = Color Create_TLVertex.Specular = Specular Create_TLVertex.TU = TU Create_TLVertex.TV = TV End Function 'Where it draws Draw_Line 0, 0, 500, 500, D3DColorRGBA(255, 255, 255, 255)
[EDIT] I spotted this but in your Draw_Line sub change the primitive count to one:
Code:Direct3D_Device.DrawPrimitiveUP D3DPT_LINESTRIP, 1, Vert_List(0), Len(Vert_List(0))





Mark Thread Resolved
Reply With Quote