|| myMainSceneFbos[0]->GetVPSizeY() != aSizeY
|| myMainSceneFbos[0]->NbSamples() != aNbSamples)
{
+ if (!myTransientDrawToFront)
+ {
+ myImmediateSceneFbos[0]->Release (aCtx.operator->());
+ myImmediateSceneFbos[1]->Release (aCtx.operator->());
+ myImmediateSceneFbos[0]->ChangeViewport (0, 0);
+ myImmediateSceneFbos[1]->ChangeViewport (0, 0);
+ }
+
// prepare FBOs containing main scene
// for further blitting and rendering immediate presentations on top
if (aCtx->core20fwd != NULL)
{
myMainSceneFbos[0]->Init (aCtx, aSizeX, aSizeY, myFboColorFormat, myFboDepthFormat, aNbSamples);
}
- if (!aCtx->caps->useSystemBuffer && myMainSceneFbos[0]->IsValid())
+ if (myTransientDrawToFront
+ && !aCtx->caps->useSystemBuffer
+ && myMainSceneFbos[0]->IsValid())
{
myImmediateSceneFbos[0]->InitLazy (aCtx, *myMainSceneFbos[0]);
}
{
anImmFbo = myImmediateSceneFbos[0].operator->();
}
+ if (!myTransientDrawToFront)
+ {
+ anImmFbo = aMainFbo;
+ }
#if !defined(GL_ES_VERSION_2_0)
if (aMainFbo == NULL
{
Handle(OpenGl_Context) aCtx = myWorkspace->GetGlContext();
GLboolean toCopyBackToFront = GL_FALSE;
- if (!myTransientDrawToFront)
+ if (theDrawFbo == theReadFbo
+ && theDrawFbo != NULL)
{
myBackBufferRestored = Standard_False;
}
if (anFbo != NULL)
{
anFbo->BindBuffer (aCtx);
+ anFbo->SetupViewport (aCtx);
}
else
{
aCtx->arbFBO->glBindFramebuffer (GL_FRAMEBUFFER, OpenGl_FrameBuffer::NO_FRAMEBUFFER);
}
#endif
+ aCtx->core11fwd->glViewport (0, 0, myWindow->Width(), myWindow->Height());
}
- aCtx->core11fwd->glViewport (0, 0, myWindow->Width(), myWindow->Height());
}
// =======================================================================