Context* CreateSceneContext()
{
Context* context = new Context( glAbstraction );
-
- //TODO: Need eglMakeCurrent first
- context->GlContextCreated();
-
sceneContextContainer.PushBack( context );
return context;
}
Context* newContext = new Context( glAbstraction );
oldSceneContext->GlContextDestroyed();
- //TODO: Need eglMakeCurrent first
- newContext->GlContextCreated();
std::replace( sceneContextContainer.begin(), sceneContextContainer.end(), oldSceneContext, newContext );
return newContext;
surfaceRect = Rect<int32_t>( 0, 0, static_cast<int32_t>( scene.GetSize().width ), static_cast<int32_t>( scene.GetSize().height ) );
}
- DALI_ASSERT_DEBUG( mImpl->currentContext->IsGlContextCreated() );
+ // Make sure that GL context must be created
+ mImpl->currentContext->GlContextCreated();
// reset the program matrices for all programs once per frame
// this ensures we will set view and projection matrix once per program per camera
{
DALI_LOG_INFO(gContextLogFilter, Debug::Verbose, "Context::GlContextCreated()\n");
- DALI_ASSERT_DEBUG(!mGlContextCreated);
-
- mGlContextCreated = true;
+ if( !mGlContextCreated )
+ {
+ mGlContextCreated = true;
- // Set the initial GL state, and check it.
- InitializeGlState();
+ // Set the initial GL state, and check it.
+ InitializeGlState();
#ifdef DEBUG_ENABLED
- PrintCurrentState();
+ PrintCurrentState();
#endif
+ }
}
void Context::GlContextDestroyed()