• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Modifying Vertex Buffers

Binsk

Member
I just realized something somewhat peculiar.

I always assumed modifying vertex buffers really wasn't something you could do after they had been defined. Then, when thinking about it, the whole purpose of vertex_freeze is to make it read-only and thus faster to submit.

However, if it is writable then you must be able to modify it.

Now, I know that calling vertex_begin will wipe the vertices and start again in the same buffer. I am assuming that this is the only way to "modify" a buffer and that vertex_freeze simply makes this no longer an option. Am I correct on this or am I missing something obscure that lets you modify vertex buffers in a different manner?

A second question I have is this; When you use vertex_begin on an already defined vertex buffer does it shrink the buffer and re-grow it as you re-define or does it keep the allocated size and just re-fill it with values?

Thanks for anyone who has answers to these. All the best.
 
Top