• Advertisement

Archived

This topic is now archived and is closed to further replies.

D3DPT_LINELIST?

This topic is 5685 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can we specify thickness for the line list primitive type? I tried adding D3DFVF_PSIZE to my vertex but it didn''t work. Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement

Hmmm... I had this problem, too. And (as far as I am aware) you cannot specify the width of the line primitive as you can with OpenGL. In the end I ended up transforming/clipping/etc. the lines myself and drew them with a slight jittered offset until I got the desired width. It is a bit of a pain in the you know what...

Regards,
Sharky

Share this post


Link to post
Share on other sites
*cough*DX9*cough*

Lines are flaky on some hardware anyway (i.e. some won''t texture them, rasterisation varies etc). Drawing them as screen aligned quads is tons more flexible and in fact is actually how some hardware does it anyway (simplifies the chip if they can just concentrate one one primitive type [i.e. triangles] and build all others [e.g. lines] from those). In some situations on some hardware lines end up running slower than just doing the equivilent quads yourself.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
DX*What?*

Yes - definitely. As S1CA mentions above it is better to go the route of screen aligned quads with todays hardware. As a quick exercise I went back to the old project (written a few months ago now - jeez, what was I thinking!) and rewrote the line rendering with screen aligned quads (as opposed to jittered lines). Although I cannot be too accurate (as this is no real benchmarking software) I estimate that the screen aligned quads render some 30-40% quicker than the line lists... running on a GeForce3. Of course this ''benchmark'' needs to be taken with a pinch of salt as in by no means set in concrete!

Cheers,
Sharky

Share this post


Link to post
Share on other sites

  • Advertisement