Changeset 11289
- Timestamp:
- 03/25/10 15:14:46 (3 years ago)
- Location:
- OpenSceneGraph/trunk
- Files:
-
- 2 modified
-
include/osgViewer/api/Cocoa/GraphicsWindowCocoa (modified) (4 diffs)
-
src/osgViewer/GraphicsWindowCocoa.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/include/osgViewer/api/Cocoa/GraphicsWindowCocoa
r10887 r11289 26 26 @class GraphicsWindowCocoaGLView; 27 27 @class NSOpenGLContext; 28 @class NSOpenGLPixelFormat; 28 29 @class NSWindow; 29 30 @class NSView; … … 32 33 class GraphicsWindowCocoaWindow; 33 34 class NSOpenGLContext; 35 class NSOpenGLPixelFormat; 34 36 class NSWindow; 35 37 class NSView; … … 159 161 NSOpenGLContext* getContext() { return _context; } 160 162 GraphicsWindowCocoaWindow* getWindow() { return _window; } 163 NSOpenGLPixelFormat* getPixelFormat() { return _pixelformat; } 161 164 162 165 void setVSync(bool f); … … 191 194 GraphicsWindowCocoaGLView* _view; 192 195 NSOpenGLContext* _context; 196 NSOpenGLPixelFormat* _pixelformat; 193 197 bool _updateContext; 194 198 }; -
OpenSceneGraph/trunk/src/osgViewer/GraphicsWindowCocoa.mm
r11207 r11289 858 858 _context = NULL; 859 859 _window = NULL; 860 _pixelformat = NULL; 861 860 862 _updateContext = false; 861 863 _valid = _initialized = true; … … 978 980 } 979 981 980 NSOpenGLPixelFormat*pixelformat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr ];981 _context = [[NSOpenGLContext alloc] initWithFormat: pixelformat shareContext: sharedContext];982 _pixelformat = [[NSOpenGLPixelFormat alloc] initWithAttributes:attr ]; 983 _context = [[NSOpenGLContext alloc] initWithFormat: _pixelformat shareContext: sharedContext]; 982 984 983 985 if (!_context) {
