aboutsummaryrefslogtreecommitdiffstats
path: root/src/native/jogl/ContextUpdater.m
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 22:52:34 +0000
committerKenneth Russel <[email protected]>2009-06-15 22:52:34 +0000
commit506b634b780dcd23aa61015c2ceba3e687196abf (patch)
tree897649a36cc769351704a050828f8e0e994c5686 /src/native/jogl/ContextUpdater.m
parent04c0c10bfee764dbd0301ae83a0fae695dcb5b23 (diff)
Deleted obsolete source code in preparation for copying JOGL_2_SANDBOX
on to trunk git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@1958 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native/jogl/ContextUpdater.m')
-rw-r--r--src/native/jogl/ContextUpdater.m83
1 files changed, 0 insertions, 83 deletions
diff --git a/src/native/jogl/ContextUpdater.m b/src/native/jogl/ContextUpdater.m
deleted file mode 100644
index 587782c98..000000000
--- a/src/native/jogl/ContextUpdater.m
+++ /dev/null
@@ -1,83 +0,0 @@
-#import "ContextUpdater.h"
-#import <pthread.h>
-
-@implementation ContextUpdater
-{
-}
-
-static NSOpenGLContext *theContext;
-static pthread_mutex_t resourceLock = PTHREAD_MUTEX_INITIALIZER;
-
-static void printLockDebugInfo(char *message, char *func, int line)
-{
- fprintf(stderr, "%s in function: \"%s\" at line: %d\n", message, func, line);
- fflush(stderr);
-}
-
-+ (void) lock
-{
- if (theContext != NULL)
- {
- pthread_mutex_lock(&resourceLock);
- }
-}
-
-+ (void) lockInFunction:(char *)func atLine:(int)line
-{
- if (theContext != NULL)
- {
- printLockDebugInfo("locked ", func, line);
- [self lock];
- }
-}
-
-+ (void) unlock
-{
- if (theContext != NULL)
- {
- pthread_mutex_unlock(&resourceLock);
- }
-}
-
-+ (void) unlockInFunction:(char *)func atLine:(int)line
-{
- if (theContext != NULL)
- {
- printLockDebugInfo("unlocked", func, line);
- [self unlock];
- }
-}
-
-- (void) registerFor:(NSOpenGLContext *)context with: (NSView *)view
-{
- if (view != NULL)
- {
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(update:) name:NSViewGlobalFrameDidChangeNotification object: view];
- theContext = context;
- }
-}
-
-- (void) update:(NSNotification *)notification
-{
- [ContextUpdater lock];
-
- [theContext update];
-
- [ContextUpdater unlock];
-}
-
-- (id) init
-{
- theContext = NULL;
-
- return [super init];
-}
-
-- (void) dealloc
-{
- [[NSNotificationCenter defaultCenter] removeObserver:self];
-
- [super dealloc];
-}
-
-@end \ No newline at end of file