ios - How to retain backing of a CAMetalLayer? -
i unable find way retain backing cametallayer, nextdrawable provides different mtltexture each time pool. if set appropriate loadaction , storeaction on render pass descriptor, backing not happen. contents flash textures swapped nextdrawable call.
i want similar behaviour keagldrawablepropertyretainedbacking in opengl es.
anyone figured 1 out?
nextdrawable provide texture in undefined state, , far know there isn't simple option keagldrawablepropertyretainedbacking change behaviour.
however, apparently possible implement copy keeping old drawable around little longer , manually performing gpu copy previous texture next. https://devforums.apple.com/message/1060027#1060027
you will, however, have set cametallayer.framebufferonly no, comes 'at cost performance' according documentation (https://developer.apple.com/library/ios/documentation/animation/reference/cametallayer_ref/#//apple_ref/occ/instp/cametallayer/framebufferonly)
Comments
Post a Comment