vertex buffers need be static length?

Started by
4 comments, last by GekkoCube 20 years, 8 months ago
i noticed that vertex buffers need to be static in length, meaning you cannot create the vertex buffer dynamically. is it necessary to create a vertex buffer that is EXACTLY the size i need it to be? Or can i have a vertex buffer that is, say, a few dozen vertices longer than what I need? what if the buffer is twice and long?
Advertisement
It''s ok if the vertex buffer is larger than how much you fill it with, just be sure to only render what you do fill. If it''s twice as large then something is very wrong and you are wasting a lot of memory (unless this is like a particle engine where the number you use changes very frequently).
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
cool...this makes life easier.
thanks
wait.
theres not way to create a vertex buffer dynamically, is there?
You can create a dynamic vertex buffer. This signals the driver that data will be changed frequently so it can put it in the most optimal place in memory. Once a vertex buffer is made however, there is no way to change the size of it.
____________________________________________________________AAAAA: American Association Against Adobe AcrobatYou know you hate PDFs...
Yeah, there is such a thing as a "dynamic vertex buffer," but it''s not what you''re talking about.

This topic is closed to new replies.

Advertisement