Sign in to follow this  
Saurabh Torne

Geometry Parametrically

Recommended Posts

Hi,

I want to create geometry without worrying about efficiency of drawing. I'm looking for a ways to draw triangles with Triangle list or triangle strip but without index buffers. It would be great to get some pointers or samples for doing it in dx.

Reply,

Saurabh

Share this post


Link to post
Share on other sites

Just use IDirect3DDevice9::DrawPrimitive instead of DrawIndexedPrimitive (on D3D9 and earlier) and ID3D11DeviceContext::Draw instead of DrawIndexed (on D3D11).

 

You'll waste some bandwidth and GPU processing power if you duplicate your vertices, but if your index calculation is complex for some reason (dynamic geometry, for example), you may actually save time on non-indexed drawing.

Edited by Nik02

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this