Rect<int> clippingRect; // Empty for fbo rendering
- windowSurface->InitializeGraphics();
-
// Switch to the context of the surface, merge damaged areas for previous frames
windowSurface->PreRender(sceneSurfaceResized, mDamagedRects, clippingRect); // Switch GL context
{
if(surface)
{
+ surface->InitializeGraphics();
surface->MakeContextCurrent();
}
currentSurface = surface;
if(currentSurface)
{
- currentSurface->InitializeGraphics();
ActivateSurfaceContext(currentSurface);
}
}
mWindowRotationAngle = angle;
mWindowRotationFinished = false;
- mResizeFinished = false;
+ mResizeFinished = false;
mWindowBase->SetWindowRotationAngle(mWindowRotationAngle);
void WindowRenderSurface::InitializeGraphics()
{
- if(mEGLContext == NULL)
- {
- mGraphics = &mAdaptor->GetGraphicsInterface();
+ mGraphics = &mAdaptor->GetGraphicsInterface();
- DALI_ASSERT_ALWAYS(mGraphics && "Graphics interface is not created");
+ DALI_ASSERT_ALWAYS(mGraphics && "Graphics interface is not created");
- auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
- mEGL = &eglGraphics->GetEglInterface();
+ auto eglGraphics = static_cast<EglGraphics*>(mGraphics);
+ mEGL = &eglGraphics->GetEglInterface();
+ if(mEGLContext == NULL)
+ {
// Create the OpenGL context for this window
Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>(*mEGL);
eglImpl.ChooseConfig(true, mColorDepth);