mCore->ProcessEvents();
}
-void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* location)
+void TestApplication::DoUpdate(uint32_t intervalMilliseconds, const char* location, bool uploadOnly)
{
if(GetUpdateStatus() == 0 &&
mRenderStatus.NeedsUpdate() == false &&
uint32_t nextVSyncTime = mLastVSyncTime + intervalMilliseconds;
float elapsedSeconds = static_cast<float>(intervalMilliseconds) * 0.001f;
- mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false);
+ mCore->Update(elapsedSeconds, mLastVSyncTime, nextVSyncTime, mStatus, false, false, uploadOnly);
GetRenderController().Initialize();
mLastVSyncTime = nextVSyncTime;
}
-bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location)
+bool TestApplication::Render(uint32_t intervalMilliseconds, const char* location, bool uploadOnly)
{
- DoUpdate(intervalMilliseconds, location);
+ DoUpdate(intervalMilliseconds, location, uploadOnly);
// Reset the status
mRenderStatus.SetNeedsUpdate(false);
mRenderStatus.SetNeedsPostRender(false);
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
- mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
- mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
- mCore->PostRender(false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
+ if(!uploadOnly)
+ {
+ mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
+ mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
+ }
+ mCore->PostRender();
mFrame++;
{
DoUpdate(intervalMilliseconds, location);
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->PreRender(mScene, damagedRects);
return mStatus.KeepUpdating() || mRenderStatus.NeedsUpdate();
{
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/, clippingRect);
- mCore->PostRender(false /*do not skip rendering*/);
+ mCore->PostRender();
mFrame++;
bool TestApplication::RenderOnly()
{
// Update Time values
- mCore->PreRender(mRenderStatus, false /*do not force clear*/, false /*do not skip rendering*/);
+ mCore->PreRender(mRenderStatus, false /*do not force clear*/);
mCore->RenderScene(mRenderStatus, mScene, true /*render the off-screen buffers*/);
mCore->RenderScene(mRenderStatus, mScene, false /*render the surface*/);
- mCore->PostRender(false /*do not skip rendering*/);
+ mCore->PostRender();
mFrame++;
void ProcessEvent(const Integration::Event& event);
void SendNotification();
- bool Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL);
+ bool Render(uint32_t intervalMilliseconds = DEFAULT_RENDER_INTERVAL, const char* location = NULL, bool uploadOnly = false);
bool PreRenderWithPartialUpdate(uint32_t intervalMilliseconds, const char* location, std::vector<Rect<int>>& damagedRects);
bool RenderWithPartialUpdate(std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect);
uint32_t GetUpdateStatus();
}
private:
- void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL);
+ void DoUpdate(uint32_t intervalMilliseconds, const char* location = NULL, bool uploadOnly = false);
protected:
TestPlatformAbstraction mPlatformAbstraction;