Show
Ignore:
Timestamp:
01/05/07 16:24:06 (7 years ago)
Author:
robert
Message:

Added GraphicsContext? support for clearing the graphis context. The clearing
is off by default (ClearMask? is 0), but can be switched on when ClearMask? is
non zero. GraphicsContext::clear() is called after each swap buffers

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osghangglide/osghangglide.cpp

    r5901 r5907  
    162162 
    163163            gw->getEventQueue()->getCurrentEventState()->setWindowRectangle(0, 0, width, height ); 
     164             
     165            // need to ensure that the window is cleared make sure that the complete window is set the correct colour 
     166            // rather than just the parts of the window that are under the camera's viewports 
     167            gw->setClearColor(osg::Vec4f(0.2f,0.2f,0.6f,1.0f)); 
     168            gw->setClearMask(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
    164169        } 
    165170        else