Show
Ignore:
Timestamp:
05/14/09 17:34:15 (4 years ago)
Author:
robert
Message:

From Stephan Huber, "attached you'll find some bugfixes and enhancements for the Cocoa
implementation of GraoicsWindowCocoa?:

Enhancements/Bugfixes:

+ now it's possible to integrate osgViewer better into existing
cocoa-applications:
* create one or more NSOpenGLView(s) and add these to your window(s)
* create one or more NSWindows
* disable the integrated event-polling of osgViewer, and let the work be
done by Cocoa / NSApplicationRun. You'll have to run the osgViewer's
runloop in a separate thread

+ missing menu-event-handling implemented

+ added NSAutoReleasePools where necessary, this fixes some memory-leaks
+ fixed some crashes and thread-issues"

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgViewer/DarwinUtils.mm

    r9895 r10208  
    249249 
    250250 
     251bool DarwinWindowingSystemInterface::setScreenSettings(const osg::GraphicsContext::ScreenIdentifier &si, const osg::GraphicsContext::ScreenSettings & settings) 
     252{ 
     253    bool result = setScreenResolutionImpl(si, settings.width, settings.height); 
     254    if (result) 
     255        setScreenRefreshRateImpl(si, settings.refreshRate); 
     256     
     257    return result; 
     258} 
     259 
     260 
    251261 
    252262/** implementation of setScreenResolution */ 
    253 bool DarwinWindowingSystemInterface::setScreenResolution(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height)  
     263bool DarwinWindowingSystemInterface::setScreenResolutionImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height)  
    254264{  
    255265    CGDirectDisplayID displayID = getDisplayID(screenIdentifier); 
     
    271281 
    272282/** implementation of setScreenRefreshRate */ 
    273 bool DarwinWindowingSystemInterface::setScreenRefreshRate(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, double refreshRate) {  
     283bool DarwinWindowingSystemInterface::setScreenRefreshRateImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, double refreshRate) {  
    274284     
    275285    boolean_t  success(false);