Show
Ignore:
Timestamp:
07/13/09 10:30:20 (4 years ago)
Author:
robert
Message:

From Stephan Huber, "ttached you'll find a small fix for the
GraphicsWindowCocoa?-implementation, which enhances multithreaded
stability, it ensures that modifications to the size of an openglcontext
is done only from one thread.
"

Files:
1 modified

Legend:

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

    r10417 r10456  
    858858    _context = NULL; 
    859859    _window = NULL; 
     860    _updateContext = false; 
    860861    _valid = _initialized = true; 
    861862} 
     
    10661067bool GraphicsWindowCocoa:: makeCurrentImplementation() 
    10671068{ 
     1069    if (_updateContext) 
     1070    { 
     1071        [_context update]; 
     1072        _updateContext = false;  
     1073    } 
     1074     
    10681075    [_context makeCurrentContext]; 
    10691076    return true; 
     
    12061213    GraphicsContext::resizedImplementation(x, y, width, height); 
    12071214     
    1208     NSAutoreleasePool* localPool = [[NSAutoreleasePool alloc] init]; 
    1209     
    1210     if (_context) 
    1211         [_context update]; 
     1215    _updateContext = true; 
     1216     
    12121217    MenubarController::instance()->update(); 
    12131218    getEventQueue()->windowResize(x,y,width, height, getEventQueue()->getTime()); 
    1214     [localPool release]; 
    12151219} 
    12161220