ofSetVerticalSync– what does it do exactly?

It synchronizes the redraw of the screen to the vertical refresh of your screen. The monitor or projector redraws the screen at usually 60 frames per second. If you don't enable the vertical sync your application runs as fast as possible and the screen can be drawing half of one frame and half of the previous, getting an effect called tearing

to avoid it you synchronize the update / draw of your app with the refresh of the screen.

By default since 0.8.0 vsync is enabled you can disable it calling ofSetVerticalSync(false)

If you draw the frame rate of the application you can see how the app runs at 60fps usually with vsync enabled and way faster without it


Screen tearing


Screen tearing is a visual artifact in video display where a display device shows information from two or more frames in a single screen draw. The artifact occurs when the video feed to the device isn't in sync with the display's refresh. This can be due to non-matching refresh rates—in which case the tear line moves as the phase difference changes (with speed proportional to difference of frame rates). It can also occur simply from lack of sync between two equal frame rates, in which case the te...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值