Vahan Babayan
Vahan Babayan

Reputation: 723

CVMetalTextureCacheCreate arguments

Anyone knows what textureAttributes argument for? Acceptable keys and values for it?

Upvotes: 0

Views: 925

Answers (2)

Viktor Goltvyanitsa
Viktor Goltvyanitsa

Reputation: 167

kCVMetalTextureCacheMaximumTextureAgeKey By default, textures age out of the cache after one second. To disable the age-out mechanism completely, set a maximum texture age of zero.

Apple Documentation -> Core Video -> CVMetalTextureCache -> Cache Attributes

sample of usage:

NSDictionary *cacheAttributes = @{
                                      (NSString*)kCVMetalTextureCacheMaximumTextureAgeKey: @(0),
                                      };

Upvotes: 0

Ken Thomases
Ken Thomases

Reputation: 90551

In the header file CVMetalTextureCache.h, near where cache attributes such as kCVMetalTextureCacheMaximumTextureAgeKey are defined, there's this comment:

// textureAttributes - reserved for future use

And nothing's defined there. So, apparently there are no acceptable keys or values.

Upvotes: 1

Related Questions