Jump to content
  • Advertisement

Archived

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

mavric

Vertex Buffers

This topic is 5758 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

Hi. Could someone please tell me weather it is better to create one vertex buffer with all the data (normals, vertex positions, texture coordanites etc.) , or to create a vertex buffer for each component and setting them in several streams? Thanks.

Share this post


Link to post
Share on other sites
Advertisement

One stream is usually faster than many. However, if one element of your vertex changes with high frequency (e.g. the diffuse colour) and all the other elements never change or do so with lower frequency then it can be faster to split into two streams - one for the static data and one for the dynamic data.

Depending on your usage patterns, more streams may be more optimal.

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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
SetStream(0, VBBuffer)
SetStream(1, VBStream)

Create the buffers as if they operate on the same data, only with different FVF s.

Share this post


Link to post
Share on other sites
I agree with all the above. But it brings to mind an interesting question for me...

Is there any reason why you would want to modify the data inside the vertices (other than to alter the shape of the polygon in ways you could not do with matrices, or color changes)?

To me, it would be a very rare thing to want to change the contents of a vertex buffer. Also, is it true that if you enable direct3D lighting, the vertex colors are ignored?

Is my understanding wrong (probably)?

[edited by - Lythic on September 15, 2002 12:52:16 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!