- if ( instruction.mIsClearColorSet )
- {
- mImpl->currentContext->ClearColor( clearColor.r,
- clearColor.g,
- clearColor.b,
- clearColor.a );
-
- // Clear the viewport area only
- mImpl->currentContext->SetScissorTest( true );
- mImpl->currentContext->Scissor( viewportRect.x, viewportRect.y, viewportRect.width, viewportRect.height );
- mImpl->currentContext->ColorMask( true );
- mImpl->currentContext->Clear( GL_COLOR_BUFFER_BIT , Context::CHECK_CACHED_VALUES );
- mImpl->currentContext->SetScissorTest( false );
- }
-
- // Clear the list of bound textures
- mImpl->boundTextures.Clear();
-
- mImpl->renderAlgorithms.ProcessRenderInstruction(
- instruction,
- *mImpl->currentContext,
- mImpl->renderBufferIndex,
- depthBufferAvailable,
- stencilBufferAvailable,
- mImpl->boundTextures );
-
- // Synchronise the FBO/Texture access when there are multiple contexts
- if ( mImpl->currentContext->IsSurfacelessContextSupported() )
- {
- // Check whether any binded texture is in the dependency list
- bool textureFound = false;
-
- if ( mImpl->boundTextures.Count() > 0u && mImpl->textureDependencyList.Count() > 0u )