Archived

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

HDATA

About DrawPrimitiveUP !

Recommended Posts

Well, apparently NVIDIA really frowns apon it. As far as I know, it''s the equivilent of creating a vertex buffer every single frame. There are probably many more reasons why drawPrimitiveUP is not a good way to render, but i''d say that one is a pretty good one.

¬_¬

Share this post


Link to post
Share on other sites
NVidia frowns on DrawPrimitiveUP because their drivers and hardware are optimized for different code paths.

Don''t call it. Ever.

If you REALLY REALLY want to use a bunch of strips, then either call DrawPrimitive (or DIP) a bunch of times, or insert dummy verts into the pipe and concatenate a bunch of strips into a single call. Dunno how well that works, tho; DIP and tri lists might wind up being faster. NVidia recommends < 500 calls to DIP, < 500 vertex buffer changes, < 200 texture changes, and < 200 SetRenderState() change sets (i.e. more calls, but batch them, and strive for < 200 batches).

Dunno what ATI says; I have a GeForce. =)

Further research in progress.

Share this post


Link to post
Share on other sites
Have just read an article on using .md2 files in DirectX 8 (I think it was either here or GamaSutra), but anyway, it uses the DrawPrimitiveUp Method! Does anyone know of an alternative method for rendering the mesh, as I assume I cannot just replace that with DrawPrimitive?

Cheers

Matt

Share this post


Link to post
Share on other sites
quote:
Original post by ironballs
... as I assume I cannot just replace that with DrawPrimitive?




Why not? For the record, there are actually very few circumstances in which you have to use a buffer in which you actually change the data often. (Yes, cases exist, but for the most part you can be using transforms, shaders, etc.)

If I remember MD2 modeling correctly, you should be able to do something very similar to the dolphin tweening example in the SDK.

Also, in general, indexed triangle lists are just as fast as strips. They''re a good bet and less screwing around than strips.


Author, "Real Time Rendering Tricks and Techniques in DirectX", "Focus on Curves and Surfaces"

Share this post


Link to post
Share on other sites