Is it possible to in-place resize VBOs?

前端 未结 3 1886
北恋
北恋 2020-12-20 12:34

The title says everything, but just to be clear I\'ll add some extra words.

In this case, resize means:

  • getting more storage space at the end
3条回答
  •  北海茫月
    2020-12-20 13:02

    Assuming you have support for a recent OpenGL standard, an alternative to VBOs might be to store your data in textures ( again, assuming you have enough memory on your card ). Copying data between old and new textures would take place on the card and not affect the data transfer.

    Exactly how you achieve this depends on exactly what your code is doing. But in principle, you use texture data to overwrite dummy vertex data in your drawing calls, or maybe use instancing. It would require a lot of thought and rework.

提交回复
热议问题