Oolite 1.91.0.7668-250429-8542c40
All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Modules Pages
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 111 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 144 of file OOGraphicsResetManager.m.

145{
146 return self;
147}

◆ copyWithZone:

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

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 122 of file OOGraphicsResetManager.m.

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

◆ dealloc

- (void) dealloc
implementation

Definition at line 38 of file OOGraphicsResetManager.m.

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

References dealloc, nil, and sSingleton.

Referenced by dealloc.

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

◆ registerClient:

◆ release

- (void) release
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 140 of file OOGraphicsResetManager.m.

141{}

◆ resetGraphicsState

- (void) resetGraphicsState

Definition at line 70 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

References clients, kOOLogException, nil, OOGL, OOLog, OOLogIndentIf, OOLogOutdentIf, OOTexture::rebindAllTextures, OOOpenGLExtensionManager::reset, resetGraphicsState, and OOOpenGLExtensionManager::sharedManager.

Referenced by OODebugController::graphicsResetAction:, OODebugController::resetAndClearAction:, resetGraphicsState, Universe::setDetailLevel:, and MyOpenGLView::update.

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

◆ retain

- (id) retain
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 128 of file OOGraphicsResetManager.m.

129{
130 return self;
131}

◆ retainCount

- (NSUInteger) retainCount
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 134 of file OOGraphicsResetManager.m.

135{
136 return UINT_MAX;
137}

◆ sharedManager

◆ unregisterClient:

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

Definition at line 64 of file OOGraphicsResetManager.m.

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

Referenced by DustEntity::dealloc, OOMesh::dealloc, OOPolygonSprite::dealloc, OOSkyDrawable::dealloc, and PlanetEntity::dealloc.

+ Here is the caller graph for this function:

Member Data Documentation

◆ clients

- (NSMutableSet*) clients
private

Definition at line 48 of file OOGraphicsResetManager.h.

Referenced by registerClient:, and resetGraphicsState.


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