Original Post
Hey, In my application I wish to render lines specified using 3D coordinates that have a stippling pattern (i want to render dashed and dash-dotted lines). I am used to OpenGL where I can specify the line stipple pattern and the lines will be rendered in the correct line style. In Direct3D I tried to use ID3DXLine, however it renders lines only in screen space (DrawTransform transforms them to screen-space and then renders them) and I don't get the effect of depth-buffering. Eventually I simulated line-stippling using textures (alpha textures + alpha test). But it means that every time the line moves or the camera moves I need to update the texture coordinates so that the stippling pattern will always have the same size, regardless of the real size of the line on the screen (the dashes must always be N pixels long, for example). Does anybody here have a more elegant solution to this problem? Maybe an idea using shaders? Alex.