Jump to content
  • Advertisement


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


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

This topic is 6481 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
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"..


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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!