Archived

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

alnite

do i need index buffers for quad textures?

Recommended Posts

alnite    3438
I just think it''s pointless and a waste of memory. I only have four vertices, there are only 2 polygons. Do you think it''s necessary to use index buffer? What about the speed? Another question: Is it a good way of using D3DPOOL_MANAGED for vertex buffers? The content of the vertex buffer will not change for the rest of the program. Thanks
500

Share this post


Link to post
Share on other sites
flaXen    122
You don''t have to use index buffers if you don''t want to. Draw your quad with a call to DrawPrimitive or DrawPrimitiveUP. Specify D3DPT_TRIANGLESTRIP as the primitive type and if your 4 verts are in the right order, they should draw as a normal quad w/o an index buffer. For more complex models (which aren''t "stripified"), you should probably use index buffers.

Share this post


Link to post
Share on other sites
RhoneRanger    100
It is a very high waste of memory to use only quads!

For your larger primitives, use indexed triangle lists.

On the other hand, if you are ONLY drawing a quad (like a billboard) use a triangle strip.

If you are rendering several quads, like in a particle system, use an indexed triangle list for those also.

Share this post


Link to post
Share on other sites