D3DPT_LINELIST?

Started by
3 comments, last by FantasyGuy 21 years, 9 months ago
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
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
*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

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

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
Hmm.. screen aligned quads then. Ok, thank you guys, that was most helpful.

This topic is closed to new replies.

Advertisement