Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOGraphicsResetManager Class Reference

#include <OOGraphicsResetManager.h>

+ Inheritance diagram for OOGraphicsResetManager:
+ Collaboration diagram for OOGraphicsResetManager:

Instance Methods

(void) - registerClient:
 
(void) - unregisterClient:
 
(void) - resetGraphicsState
 
(void) - dealloc [implementation]
 
(id) - copyWithZone: [implementation]
 
(id) - retain [implementation]
 
(NSUInteger) - retainCount [implementation]
 
(void) - release [implementation]
 
(id) - autorelease [implementation]
 

Class Methods

(OOGraphicsResetManager *) + sharedManager
 
(id) + allocWithZone: [implementation]
 

Private Attributes

NSMutableSet * clients
 

Detailed Description

Definition at line 45 of file OOGraphicsResetManager.h.

Method Documentation

◆ allocWithZone:

+ (id) allocWithZone: (NSZone *) inZone
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 33 of file OOGraphicsResetManager.m.

111 :(NSZone *)inZone
112{
113 if (sSingleton == nil)
114 {
115 sSingleton = [super allocWithZone:inZone];
116 return sSingleton;
117 }
118 return nil;
119}
static OODebugMonitor * sSingleton
return nil

◆ autorelease

- (id) autorelease
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 33 of file OOGraphicsResetManager.m.

145{
146 return self;
147}

◆ copyWithZone:

- (id) copyWithZone: (NSZone *) inZone
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 33 of file OOGraphicsResetManager.m.

122 :(NSZone *)inZone
123{
124 return self;
125}

◆ dealloc

- (void) dealloc
implementation

Definition at line 33 of file OOGraphicsResetManager.m.

39{
40 if (sSingleton == self) sSingleton = nil;
41 [clients release];
42
43 [super dealloc];
44}

◆ registerClient:

- (void) registerClient: (id<OOGraphicsResetClient>) client

Definition at line 33 of file OOGraphicsResetManager.m.

54 :(id<OOGraphicsResetClient>)client
55{
56 if (client != nil)
57 {
58 if (clients == nil) clients = [[NSMutableSet alloc] init];
59 [clients addObject:[NSValue valueWithPointer:client]];
60 }
61}

◆ release

- (void) release
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 33 of file OOGraphicsResetManager.m.

141{}

◆ resetGraphicsState

- (void) resetGraphicsState

Definition at line 33 of file OOGraphicsResetManager.m.

71{
72 NSEnumerator *clientEnum = nil;
73 id client = nil;
74
75 OOGL(glFinish());
76
77 OOLog(@"rendering.reset.start", @"%@", @"Resetting graphics state.");
78 OOLogIndentIf(@"rendering.reset.start");
79
82
83 for (clientEnum = [clients objectEnumerator]; (client = [[clientEnum nextObject] pointerValue]); )
84 {
85 @try
86 {
87 [client resetGraphicsState];
88 }
89 @catch (NSException *exception)
90 {
91 OOLog(kOOLogException, @"***** EXCEPTION -- %@ : %@ -- ignored during graphics reset.", [exception name], [exception reason]);
92 }
93 }
94
95 OOLogOutdentIf(@"rendering.reset.start");
96 OOLog(@"rendering.reset.end", @"%@", @"End of graphics state reset.");
97}
NSString *const kOOLogException
Definition OOLogging.m:651
#define OOLogOutdentIf(class)
Definition OOLogging.h:102
#define OOLog(class, format,...)
Definition OOLogging.h:88
#define OOLogIndentIf(class)
Definition OOLogging.h:101
#define OOGL(statement)
Definition OOOpenGL.h:251
OOOpenGLExtensionManager * sharedManager()
void rebindAllTextures()
Definition OOTexture.m:373

◆ retain

- (id) retain
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 33 of file OOGraphicsResetManager.m.

129{
130 return self;
131}

◆ retainCount

- (NSUInteger) retainCount
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 33 of file OOGraphicsResetManager.m.

135{
136 return UINT_MAX;
137}

◆ sharedManager

+ (OOGraphicsResetManager *) sharedManager

Definition at line 33 of file OOGraphicsResetManager.m.

48{
49 if (sSingleton == nil) sSingleton = [[self alloc] init];
50 return sSingleton;
51}

◆ unregisterClient:

- (void) unregisterClient: (id<OOGraphicsResetClient>) client

Definition at line 33 of file OOGraphicsResetManager.m.

64 :(id<OOGraphicsResetClient>)client
65{
66 [clients removeObject:[NSValue valueWithPointer:client]];
67}

Member Data Documentation

◆ clients

- (NSMutableSet*) clients
private

Definition at line 48 of file OOGraphicsResetManager.h.


The documentation for this class was generated from the following files: