#ifndef MTLTexturePool_h_Included #define MTLTexturePool_h_Included #import @interface MTLTexturePoolItem : NSObject { @private id texture; bool isBusy; } @property (readwrite, retain) id texture; @property (readwrite, assign) bool isBusy; - (id) initWithTexture:(id)tex; @end // NOTE: owns all MTLTexture objects @interface MTLTexturePool : NSObject { @private id device; NSMutableArray * pool; } @property (readwrite, assign) id device; @property (readwrite, retain) NSMutableArray * pool; - (id) initWithDevice:(id)device; - (id) getTexture:(int)width height:(int)height format:(MTLPixelFormat)format; - (void) markTextureFree:(id)texture; - (void) markAllTexturesFree; @end #endif /* MTLTexturePool_h_Included */