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.h

    r9895 r10208  
    7979 
    8080        virtual void enumerateScreenSettings(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, osg::GraphicsContext::ScreenSettingsList & resolutionList); 
     81         
     82        virtual bool setScreenSettings (const osg::GraphicsContext::ScreenIdentifier & si, const osg::GraphicsContext::ScreenSettings & settings); 
    8183 
    8284        /** return the top left coord of a specific screen in global screen space */ 
    8385        void getScreenTopLeft(const osg::GraphicsContext::ScreenIdentifier& si, int& x, int& y); 
    8486 
    85         /** implementation of setScreenResolution */ 
    86         virtual bool setScreenResolution(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height) ; 
    87  
    88         /** implementation of setScreenRefreshRate */ 
    89         virtual bool setScreenRefreshRate(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, double refreshRate); 
    90  
     87         
    9188 
    9289        /** returns screen-ndx containing rect x,y,w,h */ 
     
    9491     
    9592    protected: 
     93     
     94        /** implementation of setScreenResolution */ 
     95        bool setScreenResolutionImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, unsigned int width, unsigned int height) ; 
     96 
     97        /** implementation of setScreenRefreshRate */ 
     98        bool setScreenRefreshRateImpl(const osg::GraphicsContext::ScreenIdentifier& screenIdentifier, double refreshRate); 
     99 
    96100     
    97101        template<class PixelBufferImplementation, class GraphicsWindowImplementation>