{
instruction.mFrameBuffer->Bind( *mImpl->currentContext );
}
+ else
+ {
+ mImpl->currentContext->BindFramebuffer( GL_FRAMEBUFFER, 0u );
+ }
- mImpl->currentContext->Viewport( surfaceRect.x,
- surfaceRect.y,
- surfaceRect.width,
- surfaceRect.height );
-
- mImpl->currentContext->ClearColor( backgroundColor.r,
- backgroundColor.g,
- backgroundColor.b,
- backgroundColor.a );
+ if ( surfaceFrameBuffer )
+ {
+ mImpl->currentContext->Viewport( surfaceRect.x,
+ surfaceRect.y,
+ surfaceRect.width,
+ surfaceRect.height );
+
+ mImpl->currentContext->ClearColor( backgroundColor.r,
+ backgroundColor.g,
+ backgroundColor.b,
+ backgroundColor.a );
+ }
// Clear the entire color, depth and stencil buffers for the default framebuffer, if required.
// It is important to clear all 3 buffers when they are being used, for performance on deferred renderers
{
// check if its same as already set
Rect<int> newViewport( x, y, width, height );
- if( mViewPort != newViewport )
+
+ // Temporarily disable the viewport caching, as the implementation of GLES driver in Tizen platform
+ // share a global viewport between multiple contexts, therefore glViewport has to be called every
+ // time after glBindFramebuffer regardless of the same vewport size in the same context.
+// if( mViewPort != newViewport )
{
// set new one
LOG_GL("Viewport %d %d %d %d\n", x, y, width, height);