Jump to content
  • Advertisement

Archived

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

Commando

To use vertex buffers or no to use (DirectX8)?

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

Every DX8 document I''ve read says that I should always use vertex buffers - because they''re efficient & fast. What about in the following situation? I have an engine and I have to draw some lines every frame. Since I''m using d3d lighting I had to create another custom vertex format for the lines (lit & non-transformed). And because I have a different vertex format, I had to create another vertex buffer for the lines. The another VB has 6 vertices in it. And when I''m rendering the lines, I have to change the vertex buffer (setstreamsource) and also the vertexshader. Then I render the lines and swich back the VB and vertexshader. Isn''t this a bit silly for 3 lines (with 6 vertices)? Wouldn''t it be faster to to render the lines with drawprimitiveup and having no vertexbuffer for the lines? I think it takes more time to change the vertex buffer than to render the lines. So, if I shold use drawprimitiveup instead, what kind of memory structure it needs (is it the same kind of like vertex buffers have)? Commando Commando''s Base

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Yeah, its worth it, because if you don''t use vertex buffers, directx will go and do it behind your back so to speak, and it will be more efficient (and more within your control to optimize and debug) if you do it yourself. So remember, if you don''t use a vertex buffer, you''re still using one, but not as efficiently, and not as "intelligently"..

HTH...

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!