Oolite
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 43 of file OOGraphicsResetManager.h.

Method Documentation

◆ allocWithZone:

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

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 103 of file OOGraphicsResetManager.m.

103 :(NSZone*)inZone
104{
105 if (sSingleton == nil) {
106 sSingleton = [super allocWithZone:inZone];
107 return sSingleton;
108 }
109 return nil;
110}
static OONullTexture * sSingleton
return nil

◆ autorelease

- (id) autorelease
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 131 of file OOGraphicsResetManager.m.

132{
133 return self;
134}

◆ copyWithZone:

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

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 112 of file OOGraphicsResetManager.m.

112 :(NSZone*)inZone
113{
114 return self;
115}

◆ dealloc

- (void) dealloc
implementation

Definition at line 36 of file OOGraphicsResetManager.m.

37{
38 if (sSingleton == self)
40 [clients release];
41
42 [super dealloc];
43}

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 127 of file OOGraphicsResetManager.m.

128{
129}

◆ resetGraphicsState

- (void) resetGraphicsState

Definition at line 66 of file OOGraphicsResetManager.m.

67{
68 NSEnumerator* clientEnum = nil;
69 id client = nil;
70
71 OOGL(glFinish());
72
73 OOLog(@"rendering.reset.start", @"%@", @"Resetting graphics state.");
74 OOLogIndentIf(@"rendering.reset.start");
75
78
79 for (clientEnum = [clients objectEnumerator]; (client = [[clientEnum nextObject] pointerValue]);) {
80 @try {
81 [client resetGraphicsState];
82 }
83 @catch (NSException* exception) {
84 OOLog(kOOLogException, @"***** EXCEPTION -- %@ : %@ -- ignored during graphics reset.", [exception name], [exception reason]);
85 }
86 }
87
88 OOLogOutdentIf(@"rendering.reset.start");
89 OOLog(@"rendering.reset.end", @"%@", @"End of graphics state reset.");
90}
NSString *const kOOLogException
Definition OOLogging.m:600
#define OOLogOutdentIf(class)
Definition OOLogging.h:112
#define OOLog(class, format,...)
Definition OOLogging.h:84
#define OOLogIndentIf(class)
Definition OOLogging.h:107
#define OOGL(statement)
Definition OOOpenGL.h:262
OOOpenGLExtensionManager * sharedManager()
void rebindAllTextures()
Definition OOTexture.m:350

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

Referenced by resetGraphicsState, and Universe::setDetailLevel:.

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 117 of file OOGraphicsResetManager.m.

118{
119 return self;
120}

◆ retainCount

- (NSUInteger) retainCount
implementation

Provided by category OOGraphicsResetManager(Singleton).

Definition at line 122 of file OOGraphicsResetManager.m.

123{
124 return UINT_MAX;
125}

◆ sharedManager

◆ unregisterClient:

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

Definition at line 61 of file OOGraphicsResetManager.m.

61 :(id<OOGraphicsResetClient>)client
62{
63 [clients removeObject:[NSValue valueWithPointer:client]];
64}

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 45 of file OOGraphicsResetManager.h.

Referenced by registerClient:, and resetGraphicsState.


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