- mImpl->currentContext->SetScissorTest( false );
- mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+ mImpl->currentContext->ClearColor( clearColor.r,
+ clearColor.g,
+ clearColor.b,
+ clearColor.a );
+
+ if( !clearFullFrameRect )
+ {
+ mImpl->currentContext->SetScissorTest( true );
+ mImpl->currentContext->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height );
+ mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+ mImpl->currentContext->SetScissorTest( false );
+ }
+ else
+ {
+ mImpl->currentContext->SetScissorTest( false );
+ mImpl->currentContext->Clear( clearMask, Context::FORCE_CLEAR );
+ }