Index: /OpenSceneGraph/trunk/include/osgViewer/api/Cocoa/GraphicsWindowCocoa
===================================================================
--- /OpenSceneGraph/trunk/include/osgViewer/api/Cocoa/GraphicsWindowCocoa (revision 10887)
+++ /OpenSceneGraph/trunk/include/osgViewer/api/Cocoa/GraphicsWindowCocoa (revision 11289)
@@ -26,4 +26,5 @@
 @class GraphicsWindowCocoaGLView;
 @class NSOpenGLContext;
+@class NSOpenGLPixelFormat;
 @class NSWindow;
 @class NSView;
@@ -32,4 +33,5 @@
 class GraphicsWindowCocoaWindow;
 class NSOpenGLContext;
+class NSOpenGLPixelFormat;
 class NSWindow;
 class NSView;
@@ -159,4 +161,5 @@
         NSOpenGLContext* getContext() { return _context; }
         GraphicsWindowCocoaWindow* getWindow() { return _window; }
+        NSOpenGLPixelFormat* getPixelFormat() { return _pixelformat; }
                 
         void setVSync(bool f);
@@ -191,4 +194,5 @@
         GraphicsWindowCocoaGLView*      _view;
         NSOpenGLContext*                _context;
+        NSOpenGLPixelFormat*            _pixelformat;
         bool                            _updateContext;
 };
Index: /OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCocoa.mm
===================================================================
--- /OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCocoa.mm (revision 11207)
+++ /OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCocoa.mm (revision 11289)
@@ -858,4 +858,6 @@
     _context = NULL;
     _window = NULL;
+    _pixelformat = NULL;
+    
     _updateContext = false;
     _valid = _initialized = true;
@@ -978,6 +980,6 @@
     }
     
-    NSOpenGLPixelFormat* pixelformat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr ];
-    _context = [[NSOpenGLContext alloc] initWithFormat: pixelformat shareContext: sharedContext];
+    _pixelformat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr ];
+    _context = [[NSOpenGLContext alloc] initWithFormat: _pixelformat shareContext: sharedContext];
     
     if (!_context) {
