Line width in Direct3D

Started by
2 comments, last by Programmer16 16 years, 9 months ago
Greetings! I was wondering whenever it is possible to set the thicknes/boldnes of a line in Direct3D ? I would like to create a maya like grid, where the center (black) lines are bold compared to the casual grey lines. I tried it with FVF using: D3DFVF_XYZ | D3DFVF_PSIZE | D3DFVF_DIFFUSE The colors are ok and the lines get drawn too in 3D perspective, but still, the black lines are just as thick as the other ones. Does anyone have a suggestion what do I have to turn on in order PSIZE to get noticed?
Advertisement
There's no way to do this with standard lines. Either simulate it with polygons / textures, or use ID3DXLine, which will do this for you.
ID3DXLine accepts only Vector2D as input so it is not possible to draw a 3D Mesh (where y is allways 0). It is only possible to draw 2D lines with ID3DXLine so it is not acceptable.
Look again; for 3D lines you need to use DrawTransform() which uses 3D vectors and a matrix.

This topic is closed to new replies.

Advertisement