+ // Initialize EGL & OpenGL
+ Dali::DisplayConnection& displayConnection = mAdaptorInterfaces.GetDisplayConnectionInterface();
+ displayConnection.Initialize();
+
+ RenderSurfaceInterface* currentSurface = nullptr;
+
+#if DALI_GLES_VERSION >= 30
+
+ GraphicsInterface& graphics = mAdaptorInterfaces.GetGraphicsInterface();
+ EglGraphics* eglGraphics = static_cast<EglGraphics *>(&graphics);
+
+ // This will only be created once
+ EglInterface* eglInterface = &eglGraphics->GetEglInterface();
+
+ Internal::Adaptor::EglImplementation& eglImpl = static_cast<Internal::Adaptor::EglImplementation&>( *eglInterface );
+ eglImpl.ChooseConfig( true, COLOR_DEPTH_32 ); // Always use this for shared context???
+
+ // Create a surfaceless OpenGL context for shared resources
+ eglImpl.CreateContext();
+ eglImpl.MakeContextCurrent( EGL_NO_SURFACE, eglImpl.GetContext() );
+
+#else // DALI_GLES_VERSION >= 30
+
+ currentSurface = mAdaptorInterfaces.GetRenderSurfaceInterface();