Dynamic Vertex Buffers

ynamic vertex buffers on the other hand allow us to manipulate the information inside the vertex buffer each frame if we need to. These buffers are much slower than static vertex buffers but that is the trade off for the extra functionality.

The reason we use dynamic vertex buffers with 2D rendering is because we often want to move the 2D image around the screen to different locations. A good example is a mouse pointer, it gets moved often so the vertex data that represents its position on the screen needs to change often as well.

Two extra things to note. Don't use dynamic vertex buffers unless they are absolutely called for, they are quite a bit slower than static buffers. Secondly never destroy and recreate a static vertex buffer each frame, this can completely lock the video card (which I have seen on ATI but not on Nvidia) and is far worse in overall performance when compared to using dynamic vertex buffers.

转载于:https://www.cnblogs.com/seebro/p/3556592.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值