c1t1z3n0

Is there a way to draw lines using DrawPrimitive( D3DPT_LINELIST, 0, 2 ); and add weight to them Is there a RenderState you can set Some way to modify the vertex or pixel shader to accomplish this Thanx for any help in advance.



Re: Game Technologies: Graphics Drawing weighted lines without using ID3DXLine

The ZMan

No, line lists are very primitive beasts and have no flexibility. Even if they did I'm sure the render states would vary greatly on graphics cards.

You need to use D3DXLine (Line class in managed code) to give lines thickness. Or if thats not flexible enough (or you hit odd clipping bugs which I see all the time with big lines) roll your own using polygons for lines (which is what D3DXLine does under the covers).

Modifying a shader wouldn't help - you can't add geometry until DX10 and the pixel shader is only called for pixels that need to draw - you can't add extra pixels.