Jump to content
  • Advertisement
Sign in to follow this  

Setting stream source and indices each frame.

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

Do I need to set the stream source and indices and vertex declaration each frame when rendering with the vertex buffer?

the reason I ask is because I noticed a reduction in the frame rate when I started doing this so I wondered if there was something else I should be doing instead?

Share this post


Link to post
Share on other sites
Advertisement
Normally not, once set it will "stick" until next time you set it to something else.

It's odd that this gave you a perf reduction. You normally should not even notice it. What kind of reduction did you get?

Share this post


Link to post
Share on other sites
Actually I was in windowed and when running in fullscreen there doesnt seem to be a reduction.

The reason I started setting this each frame is because Im drawing with the vertex buffer then drawing some static models and then drawing something else with the vertex buffer. So pressumably I need to set this in the render function before drawing with the vertex buffer?

So in that scenario it would get set twice per frame before both of the seperate drawprimitive calls. Is that ok?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!