Oolite
Loading...
Searching...
No Matches
OOTexture(OOPrivate) Category Reference

Instance Methods

(void) - addToCaches
(void) - forceRebind

Class Methods

(OOTexture *) + existingTextureForKey:
(void) + checkExtensions

Detailed Description

Definition at line 99 of file OOTexture.m.

Method Documentation

◆ addToCaches

- (void) addToCaches

Extends class OOTexture.

Definition at line 412 of file OOTexture.m.

413{
414#ifndef OOTEXTURE_NO_CACHE
415 NSString* cacheKey = [self cacheKey];
416 if (cacheKey == nil)
417 return;
418
419 // Add self to in-use textures cache, wrapped in an NSValue so the texture isn't retained by the cache.
421 sLiveTextureCache = [[NSMutableDictionary alloc] init];
422
423 SET_TRACE_CONTEXT(@"in-use textures cache - SHOULD NOT RETAIN");
424 [sLiveTextureCache setObject:[NSValue valueWithPointer:self] forKey:cacheKey];
426
427 // Add self to recent textures cache.
429 sRecentTextures = [[OOCache alloc] init];
430 [sRecentTextures setName:@"recent textures"];
432 [sRecentTextures setPruneThreshold:kRecentTexturesCount];
433 }
434
435 SET_TRACE_CONTEXT(@"adding to recent textures cache");
436 [sRecentTextures setObject:self forKey:cacheKey];
438#endif
439}
#define EXPECT_NOT(x)
return nil
#define CLEAR_TRACE_CONTEXT()
Definition OOTexture.m:128
#define SET_TRACE_CONTEXT(str)
Definition OOTexture.m:124
static OOCache * sRecentTextures
Definition OOTexture.m:94
static NSMutableDictionary * sLiveTextureCache
Definition OOTexture.m:92
void setPruneThreshold:(unsigned threshold)
Definition OOCache.m:279
void setName:(NSString *name)
Definition OOCache.m:350
void setAutoPrune:(BOOL flag)
Definition OOCache.m:294
void setObject:forKey:(id value,[forKey] id key)
Definition OOCache.m:256

References addToCaches, OOTexture::cacheKey, CLEAR_TRACE_CONTEXT, EXPECT_NOT, nil, SET_TRACE_CONTEXT, OOCache::setAutoPrune:, OOCache::setName:, OOCache::setObject:forKey:, OOCache::setPruneThreshold:, sLiveTextureCache, and sRecentTextures.

Referenced by addToCaches.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ checkExtensions

+ (void) checkExtensions

Extends class OOTexture.

References checkExtensions, and nil.

Referenced by checkExtensions.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ existingTextureForKey:

+ (OOTexture *) existingTextureForKey: (NSString *) key

Extends class OOTexture.

References forceRebind.

Here is the call graph for this function:

◆ forceRebind

- (void) forceRebind

Extends class OOTexture.

Definition at line 407 of file OOTexture.m.

408{
410}
#define OOLogGenericSubclassResponsibility()
Definition OOLogging.h:141

References forceRebind, and OOLogGenericSubclassResponsibility.

Referenced by existingTextureForKey:, and forceRebind.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this category was generated from the following file: