void TestApplication::Initialize()
{
+ // We always need the first update!
+ mStatus.keepUpdating = Integration::KeepUpdating::STAGE_KEEP_RENDERING;
+
mCore = Dali::Integration::Core::New(
mRenderController,
mPlatformAbstraction,
mCore->SurfaceResized( mSurfaceWidth, mSurfaceHeight );
}
-void TestApplication::DoUpdate( unsigned int intervalMilliseconds )
+void TestApplication::DoUpdate( unsigned int intervalMilliseconds, const char* location )
{
+ if( GetUpdateStatus() == 0 &&
+ mRenderStatus.NeedsUpdate() == false &&
+ ! GetRenderController().WasCalled(TestRenderController::RequestUpdateFunc) )
+ {
+ fprintf(stderr, "WARNING - Update not required :%s\n", location==NULL?"NULL":location);
+ }
+
unsigned int nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
float elapsedSeconds = intervalMilliseconds / 1e3f;
mCore->Update( elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus );
+ GetRenderController().Initialize();
+
mLastVSyncTime = nextVSyncTime;
}
-bool TestApplication::Render( unsigned int intervalMilliseconds )
+bool TestApplication::Render( unsigned int intervalMilliseconds, const char* location )
{
- DoUpdate( intervalMilliseconds );
+ DoUpdate( intervalMilliseconds, location );
mCore->Render( mRenderStatus );
mFrame++;
return mStatus.KeepUpdating();
}
+bool TestApplication::GetRenderNeedsUpdate()
+{
+ return mRenderStatus.NeedsUpdate();
+}
+
bool TestApplication::RenderOnly( )
{
// Update Time values
void TestApplication::ResetContext()
{
mCore->ContextDestroyed();
+ mGlAbstraction.Initialize();
mCore->ContextCreated();
}