Mind if we discuss VBO streaming?

Started by
9 comments, last by tanzanite7 11 years, 8 months ago
A bit confusing reply :/


Orphaning is actually an incredibly cheap operation ...

Yes, and not doing something at all is even cheaper than doing it needlessly (*).

Which is why i recommended ...

If you size your buffer so that it's always at least large enough for 3 or more frames of data, you don't even need to orphan at all - by the time you reset your position back to 0 the GPU will already have finished with the vertexes at the start of the buffer, so you can just map the range as normal.

... wait ... you propose the exact same option. Except ...


No need for sync objects and everything runs smoothly.

... i would still use it for purely sanity reasons (GL does not specify how many frames are allowed in command buffer. Ie, swapbuffers does not mean a glFinish nowadays [thankfully] as modern drivers add it to command buffer like all the other commands - up to driver specific limit).

(*) hm, on second thought, for such a small buffer it indeed should not make much difference. I use orphaning exclusively for use-once streams as they all happen to be few and small in my case. Such exceptions excepted - i prefer to use one big buffer for all the use-once-or-perhaps-more streaming (instead of thousands of separate buffers for them [4K-40K real case, ~2-8K per second flying in/out]) and do the syncing/management on my own (no cons and plenty pros).

This topic is closed to new replies.

Advertisement