I got 200fps. With the vertex buffer I was getting 100fps.
I repeat: Do not time in FPS, time in milliseconds.
You did not drop by 100 FPS, you dropped by 5 milliseconds.
Before we can really give you any meaningful advice you are long overdue in giving as real information.
How often is “occasionally” updating?
Show the update routine.
Show the code for making the vertex buffer.
Are you using index buffers?
As I'd mentioned before, if I drew everything as a single model, I got 200fps.
What does that mean?
A single draw call?
With the vertex buffer I was getting 100fps.
What does that mean? You were drawing without a vertex buffer before?
So yeah, I'm not buying that it's a necessary cost at all, there must be something else to it!
Without clarification on what you actually changed to go from 5 milliseconds per frame to 5.55555 milliseconds per frame (see how we don’t measure things in FPS because it’s misleading?), I assume:
#1: You were drawing everything in a single draw call originally.
#2: You went from that to drawing some things in a single draw call and other things in multiple draw calls with a dynamic buffer. That is when you noticed a decrease of 5 milliseconds per frame (200 FPS -> 100 FPS).
Then it makes perfect sense.
Drawing everything all at once with a single draw call and no state changes is of course absurdly fast. It’s also impossible in a real game, which means there is no point in benchmarking it.
When you break the scene into multiple draw calls with state changes, that is where your performance is going.
There is a heavy hit for changing shaders (even if it is the same shader being set twice in a row), textures, render targets, vertex buffers, etc.
It’s not just because you switched to a dynamic vertex buffer. You also added multiple draw calls and state changes.
That is, assuming my #1 and #2 are correct.
Again, the amount of information we don’t have here is extremely high.
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums